Re: [Lldb-commits] Build error in lldb
Resending to new mailing list. @cs.uiuc.edu doesn't work anymore, all messages should go to @lists.llvm.org. On Thu, Aug 6, 2015 at 8:46 AM Zachary Turner wrote: > This patch (http://reviews.llvm.org/D11717) was supposed to fix it, but I > don't see anything posted to lldb-commits indicating that it was actually > committed. Can you confirm if this patch exists in your repo or not, and > if not please try to apply this and let me know if it works. > > On Wed, Aug 5, 2015 at 11:48 PM Kallesh, Vijay-teekinavar < > vijay-teekinavar.kall...@amd.com> wrote: > >> Hi Zachary Turner, >> >> >> >> Below error was observed on lldb while compiling llvm on Red Hat >> Enterprise Linux Server release 7.1, >> >> >> >> llvm[3]: Linking Release+Asserts Shared Library liblldb.so >> >> /home/amd/JENKINS/workspace/CPUPC_Mirror_Branch/2015-08-04_12-46-03/Release+Asserts/lib/liblldbAPI.a(SystemInitializerFull.o): >> In function `lldb_private::SystemInitializerFull::InitializeSWIG()': >> >> SystemInitializerFull.cpp:(.text._ZN12lldb_private21SystemInitializerFull14InitializeSWIGEv+0x12d): >> undefined reference to >> `lldb_private::ScriptInterpreterPython::InitializeInterpreter(void (*)(), >> bool (*)(char const*, char const*, >> std::shared_ptr const&, >> std::shared_ptr const&), bool (*)(char >> const*, char const*, std::shared_ptr const&, >> std::shared_ptr const&), bool (*)(char const*, >> void*, lldb_private::SharingPtr const&, void**, >> std::shared_ptr const&, std::string&), >> void* (*)(char const*, char const*, >> lldb_private::SharingPtr const&), void* (*)(char >> const*, char const*, std::shared_ptr), unsigned >> long (*)(void*), void* (*)(void*, unsigned int), int (*)(void*, char >> const*), void* (*)(void*), >> lldb_private::SharingPtr (*)(void*), bool >> (*)(void*), bool (*)(void*), void* (*)(void*), bool (*)(char const*, char >> const*, std::shared_ptr&, char const*, >> lldb_private::CommandReturnObject&, >> std::shared_ptr), bool (*)(void*, >> std::shared_ptr&, char const*, >> lldb_private::CommandReturnObject&, >> std::shared_ptr), bool (*)(char const*, >> char const*, std::shared_ptr&), void* (*)(char >> const*, char const*, std::shared_ptr const&), bool >> (*)(char const*, char const*, std::shared_ptr&, >> std::string&), bool (*)(char const*, char const*, >> std::shared_ptr&, std::string&), bool (*)(char >> const*, char const*, std::shared_ptr&, std::string&), >> bool (*)(char const*, char const*, >> std::shared_ptr&, std::string&), bool (*)(char >> const*, char const*, lldb_private::SharingPtr&, >> std::string&), void* (*)(void*, char const*, >> std::shared_ptr const&), void* (*)(char const*, char >> const*, std::shared_ptr const&), bool (*)(void*, >> char const*, lldb_private::Event*, bool&))' >> >> /home/amd/JENKINS/workspace/CPUPC_Mirror_Branch/2015-08-04_12-46-03/Release+Asserts/lib/liblldbAPI.a(SystemInitializerFull.o): >> In function `lldb_private::SystemInitializerFull::Initialize()': >> >> SystemInitializerFull.cpp:(.text._ZN12lldb_private21SystemInitializerFull10InitializeEv+0x12): >> undefined reference to >> `lldb_private::ScriptInterpreterNone::Initialize()' >> >> SystemInitializerFull.cpp:(.text._ZN12lldb_private21SystemInitializerFull10InitializeEv+0x17): >> undefined reference to >> `lldb_private::ScriptInterpreterPython::Initialize()' >> >> collect2: error: ld returned 1 exit status >> >> >> >> We see build is getting successfully built till git commit ID - >> “e40914c1df4cfb4f93c9c7b6283707f9b6fa426c” and issue is on commit ID – >> “fb2f0d0b20fd69f950bb8114e68b21c6f7fbb248” >> >> >> >> [amd@bglpence4 lldb]$ git log -2 >> >> commit fb2f0d0b20fd69f950bb8114e68b21c6f7fbb248 >> >> Author: Zachary Turner >> >> Date: Thu Jul 30 20:28:07 2015 + >> >> >> >> Convert the ScriptInterpreter system to a plugin-based one. >> >> >> >> Previously embedded interpreters were handled as ad-hoc source >> >> files compiled into source/Interpreter. This made it hard to >> >> disable a specific interpreter, or to add support for other >> >> interpreters and allow the developer to choose which interpreter(s) >> >> were enabled for a particular build. >> >> >> >> This patch converts script interpreters over to a plugin-based system. >> >> Script interpreters now live in source/Plugins/ScriptInterpreter, and >> >> the canonical LLDB interpreter, ScriptInterpreterPython, is moved >> there >> >> as well. >> >> >> >> Any new code interfacing with the Python C API must live in this >> location >> >> from here on out. Additionally, generic code should never need to >> >> reference or make assumptions about the presence of a specific >> interpreter >> >> going forward. >> >> >> >> Differential Revision: http://reviews.llvm.org/D11431 >> >> Reviewed By: Greg Clayton >> >> >> >> git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@243681 >> 91177308-0d34-0410-b5e6-96231b3b80d8 >> >> >> >> commit e40914c1df4cfb4f93c9c7b6283707f9b6fa426c >> >>
Re: [Lldb-commits] [PATCH] D11102: Set the default language to use when evaluating to that of the frame's CU.
dawn added a comment. Please review? Thank you. http://reviews.llvm.org/D11102 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D11102: Set the default language to use when evaluating to that of the frame's CU.
Sorry, I don't have much to add here. I guess you need to wait for Sean or Jim to respond. On Thu, Aug 6, 2015 at 1:22 PM Dawn Perchik wrote: > dawn added a comment. > > Please review? Thank you. > > > http://reviews.llvm.org/D11102 > > > > ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D11816: Allow dosep.py to print full output of dotest.py, even when dotest succeeds.
zturner created this revision. zturner added reviewers: dawn, chaoren. zturner added a subscriber: lldb-commits. Previously all test output was reported by each individual instance of dotest.py. After a recent patch, dosep gets dotest outptu via a pipe, and selectively decides which output to print. This breaks certain scripts which rely on having full output of each dotest instance to do various parsing and/or log-scraping. While we make no promises about the format of dotest output, it's easy to restore this to the old behavior for now, although it is behind a flag. To re-enable full output, run dosep.py with the -s option. http://reviews.llvm.org/D11816 Files: test/dosep.py Index: test/dosep.py === --- test/dosep.py +++ test/dosep.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python """ Run the test suite using a separate process for each test file. @@ -67,6 +67,7 @@ test_counter = None total_tests = None dotest_options = None +output_on_success = False def setup_global_variables(lock, counter, total, options): global output_lock, test_counter, total_tests, dotest_options @@ -75,18 +76,30 @@ total_tests = total dotest_options = options -def update_status(name = None, command = None, output = None): +def report_test_failure(name, command, stdout, stderr): +global output_lock +with output_lock: +print >> sys.stderr, stdout +print >> sys.stderr, "[%s] FAILED" % name +print >> sys.stderr, "Command invoked: %s" % ' '.join(command) +print >> sys.stderr, "stderr:\n%s" % stderr +update_progress() + +def report_test_pass(name, stdout): +global output_lock, output_on_success +with output_lock: +if output_on_success: +print >> sys.stderr, stdout +print >> sys.stderr, "[%s] PASSED" % name +update_progress() + +def update_progress(): global output_lock, test_counter, total_tests with output_lock: -if output is not None: -print >> sys.stderr -print >> sys.stderr, "Failed test suite: %s" % name -print >> sys.stderr, "Command invoked: %s" % ' '.join(command) -print >> sys.stderr, "stdout:\n%s" % output[0] -print >> sys.stderr, "stderr:\n%s" % output[1] -sys.stderr.write("\r%*d out of %d test suites processed" % +sys.stderr.write("\r%*d out of %d test suites processed\n" % (len(str(total_tests)), test_counter.value, total_tests)) test_counter.value += 1 +sys.stdout.flush() sys.stderr.flush() def parse_test_results(output): @@ -126,7 +139,10 @@ output = process.communicate() exit_status = process.returncode passes, failures = parse_test_results(output) -update_status(name, command, output if exit_status != 0 else None) +if exit_status == 0: +report_test_pass(name, output[1]) +else: +report_test_failure(name, command, output[0], output[1]) return exit_status, passes, failures def process_dir(root, files, test_root, dotest_argv): @@ -194,11 +210,11 @@ test_work_items.append((root, files, test_directory, dotest_argv)) global output_lock, test_counter, total_tests -output_lock = multiprocessing.Lock() +output_lock = multiprocessing.RLock() total_tests = len(test_work_items) test_counter = multiprocessing.Value('i', 0) print >> sys.stderr, "Testing: %d tests, %d threads" % (total_tests, num_threads) -update_status() +update_progress() # Run the items, either in a pool (for multicore speedup) or # calling each individually. @@ -327,6 +343,12 @@ dest='dotest_options', help="""The options passed to 'dotest.py' if specified.""") +parser.add_option('-s', '--output-on-success', + action='store_true', + dest='output_on_success', + default=False, + help="""Print full output of 'dotest.py' even when it succeeds.""") + parser.add_option('-t', '--threads', type='int', dest='num_threads', @@ -340,6 +362,8 @@ parser = dotest_args.create_parser() global dotest_options +global output_on_success +output_on_success = opts.output_on_success dotest_options = dotest_args.parse_args(parser, dotest_argv) if not dotest_options.s: ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D11816: Allow dosep.py to print full output of dotest.py, even when dotest succeeds.
zturner added a comment. I want to make it clear again though that we do not support relying on the output of dotest.py when running dosep. The patch which originally broke this made it possible to collect detailed information about the tests that were run from within dosep. If you want to process the results of the test suite with some kind of scraping utility,, the proper way to do this is to have `dosep.py` do the aggregation and print it in a summary section of dosep. http://reviews.llvm.org/D11816 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D11816: Allow dosep.py to print full output of dotest.py, even when dotest succeeds.
chaoren added inline comments. Comment at: test/dosep.py:82 @@ +81,3 @@ +with output_lock: +print >> sys.stderr, stdout +print >> sys.stderr, "[%s] FAILED" % name Why did you move this here? Could you please move stderr here too? It seems weird stderr is labeled but stdout isn't. Comment at: test/dosep.py:102 @@ -89,2 +101,3 @@ test_counter.value += 1 +sys.stdout.flush() sys.stderr.flush() This and `sys.stderr.flush()` should be under the `with output_lock:`. My mistake. Sorry. Comment at: test/dosep.py:142 @@ -128,2 +141,3 @@ passes, failures = parse_test_results(output) -update_status(name, command, output if exit_status != 0 else None) +if exit_status == 0: +report_test_pass(name, output[1]) Could you please do: ``` if exit_status != 0: report_test_failure(...) elif output_on_success: report_test_pass(...) ``` so it's completely silent on success? Comment at: test/dosep.py:143 @@ +142,3 @@ +if exit_status == 0: +report_test_pass(name, output[1]) +else: Do you mean `output[0]`? For consistency, should we print stderr for success too? Even if it's mostly empty. http://reviews.llvm.org/D11816 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D11816: Allow dosep.py to print full output of dotest.py, even when dotest succeeds.
zturner added inline comments. Comment at: test/dosep.py:82 @@ +81,3 @@ +with output_lock: +print >> sys.stderr, stdout +print >> sys.stderr, "[%s] FAILED" % name chaoren wrote: > Why did you move this here? Could you please move stderr here too? It seems > weird stderr is labeled but stdout isn't. I played with various combinations, and this way seemed the most intuitive when you actually run it with the various options and see the output. The important thing is to make it consistent with the behavior of `report_test_pass`. Currently, the output will look like this: UNSUPPORTED: LLDB (d:\src\llvmbuild\ninja_release\bin\clang.exe-i686) :: test_sb_api_directory (TestPublicAPIHeaders.SBDirCheckerCase) (This test is only for LLDB.framework built 64-bit and !lldb.test_remote) -- Ran 1 test in 0.157s RESULT: PASSED (0 passes, 0 failures, 0 errors, 1 skipped, 0 expected failures, 0 unexpected successes) [120998 refs] [TestPublicAPIHeaders.py] PASSED 1 out of 387 test suites processed It looks awkward to me to label that with stdout. stdout is what people normally expect to see as output. So I kind of think only stderr should be labelled. (Even better would be to use colors, but that's a followup). The reason I moved it before the `[%s] FAILED' line is because I think this is the easiest format for making sense of it when scanning it visually. First you want to see the output, then you want to see whether it passed or failed, then you want to see the errors. It's jarring to me to see the errors printed out before the message that says it failed. By the time you finish scanning through the errors to Comment at: test/dosep.py:143 @@ +142,3 @@ +if exit_status == 0: +report_test_pass(name, output[1]) +else: chaoren wrote: > Do you mean `output[0]`? For consistency, should we print stderr for success > too? Even if it's mostly empty. Actually I guess I should pass both values in. For some arbitrary reason, the actual useful information from dotest is in stderr, not stdout. And stdout is mostly useless. http://reviews.llvm.org/D11816 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D11816: Allow dosep.py to print full output of dotest.py, even when dotest succeeds.
zturner added inline comments. Comment at: test/dosep.py:82 @@ +81,3 @@ +with output_lock: +print >> sys.stderr, stdout +print >> sys.stderr, "[%s] FAILED" % name zturner wrote: > chaoren wrote: > > Why did you move this here? Could you please move stderr here too? It seems > > weird stderr is labeled but stdout isn't. > I played with various combinations, and this way seemed the most intuitive > when you actually run it with the various options and see the output. The > important thing is to make it consistent with the behavior of > `report_test_pass`. Currently, the output will look like this: > > UNSUPPORTED: LLDB (d:\src\llvmbuild\ninja_release\bin\clang.exe-i686) :: > test_sb_api_directory (TestPublicAPIHeaders.SBDirCheckerCase) (This test is > only for LLDB.framework built 64-bit and !lldb.test_remote) > -- > Ran 1 test in 0.157s > > RESULT: PASSED (0 passes, 0 failures, 0 errors, 1 skipped, 0 expected > failures, 0 unexpected successes) > [120998 refs] > > [TestPublicAPIHeaders.py] PASSED > 1 out of 387 test suites processed > > It looks awkward to me to label that with stdout. stdout is what people > normally expect to see as output. So I kind of think only stderr should be > labelled. (Even better would be to use colors, but that's a followup). > > The reason I moved it before the `[%s] FAILED' line is because I think this > is the easiest format for making sense of it when scanning it visually. > First you want to see the output, then you want to see whether it passed or > failed, then you want to see the errors. It's jarring to me to see the > errors printed out before the message that says it failed. By the time you > finish scanning through the errors to Actually, because of the strange behavior of dotest, maybe there's not a better solution. stdout is basically useless when a test passes *and* when it fails. We might as well not print it at all. So maybe I can just remove the stdout line, and only print stderr. Don't even need to label it. Because it's the only output that even means anything from dotest anyway AFAICT http://reviews.llvm.org/D11816 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D11816: Allow dosep.py to print full output of dotest.py, even when dotest succeeds.
zturner added inline comments. Comment at: test/dosep.py:142 @@ -128,2 +141,3 @@ passes, failures = parse_test_results(output) -update_status(name, command, output if exit_status != 0 else None) +if exit_status == 0: +report_test_pass(name, output[1]) chaoren wrote: > Could you please do: > > ``` > if exit_status != 0: > report_test_failure(...) > elif output_on_success: > report_test_pass(...) > ``` > > so it's completely silent on success? I don't know that it should be completely silent. For starters, if you do it the way you suggest, it won't end up updating the progress, which is something you definitely need to see. But I think it's worthwhile to see the names of the individual tests that are running. The way I've written it now, you if `output_on_success` is False, you will only see one additional line, which is the name of the test being run. I think that's useful and does not add any noise to the output http://reviews.llvm.org/D11816 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D11816: Allow dosep.py to print full output of dotest.py, even when dotest succeeds.
zturner updated this revision to Diff 31482. http://reviews.llvm.org/D11816 Files: test/dosep.py Index: test/dosep.py === --- test/dosep.py +++ test/dosep.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python """ Run the test suite using a separate process for each test file. @@ -67,6 +67,7 @@ test_counter = None total_tests = None dotest_options = None +output_on_success = False def setup_global_variables(lock, counter, total, options): global output_lock, test_counter, total_tests, dotest_options @@ -75,19 +76,30 @@ total_tests = total dotest_options = options -def update_status(name = None, command = None, output = None): +def report_test_failure(name, command, output): +global output_lock +with output_lock: +print >> sys.stderr, output +print >> sys.stderr, "[%s] FAILED" % name +print >> sys.stderr, "Command invoked: %s" % ' '.join(command) +update_progress() + +def report_test_pass(name, output): +global output_lock, output_on_success +with output_lock: +if output_on_success: +print >> sys.stderr, output +print >> sys.stderr, "[%s] PASSED" % name +update_progress() + +def update_progress(): global output_lock, test_counter, total_tests with output_lock: -if output is not None: -print >> sys.stderr -print >> sys.stderr, "Failed test suite: %s" % name -print >> sys.stderr, "Command invoked: %s" % ' '.join(command) -print >> sys.stderr, "stdout:\n%s" % output[0] -print >> sys.stderr, "stderr:\n%s" % output[1] -sys.stderr.write("\r%*d out of %d test suites processed" % +sys.stderr.write("\r%*d out of %d test suites processed\n" % (len(str(total_tests)), test_counter.value, total_tests)) test_counter.value += 1 -sys.stderr.flush() +sys.stdout.flush() +sys.stderr.flush() def parse_test_results(output): passes = 0 @@ -126,7 +138,11 @@ output = process.communicate() exit_status = process.returncode passes, failures = parse_test_results(output) -update_status(name, command, output if exit_status != 0 else None) +if exit_status == 0: +# stdout does not have any useful information from 'dotest.py', only stderr does. +report_test_pass(name, output[1]) +else: +report_test_failure(name, command, output[1]) return exit_status, passes, failures def process_dir(root, files, test_root, dotest_argv): @@ -194,11 +210,11 @@ test_work_items.append((root, files, test_directory, dotest_argv)) global output_lock, test_counter, total_tests -output_lock = multiprocessing.Lock() +output_lock = multiprocessing.RLock() total_tests = len(test_work_items) test_counter = multiprocessing.Value('i', 0) print >> sys.stderr, "Testing: %d tests, %d threads" % (total_tests, num_threads) -update_status() +update_progress() # Run the items, either in a pool (for multicore speedup) or # calling each individually. @@ -327,6 +343,12 @@ dest='dotest_options', help="""The options passed to 'dotest.py' if specified.""") +parser.add_option('-s', '--output-on-success', + action='store_true', + dest='output_on_success', + default=False, + help="""Print full output of 'dotest.py' even when it succeeds.""") + parser.add_option('-t', '--threads', type='int', dest='num_threads', @@ -340,6 +362,8 @@ parser = dotest_args.create_parser() global dotest_options +global output_on_success +output_on_success = opts.output_on_success dotest_options = dotest_args.parse_args(parser, dotest_argv) if not dotest_options.s: ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D11816: Allow dosep.py to print full output of dotest.py, even when dotest succeeds.
chaoren added inline comments. Comment at: test/dosep.py:142 @@ -128,2 +141,3 @@ passes, failures = parse_test_results(output) -update_status(name, command, output if exit_status != 0 else None) +if exit_status == 0: +report_test_pass(name, output[1]) zturner wrote: > chaoren wrote: > > Could you please do: > > > > ``` > > if exit_status != 0: > > report_test_failure(...) > > elif output_on_success: > > report_test_pass(...) > > ``` > > > > so it's completely silent on success? > I don't know that it should be completely silent. For starters, if you do it > the way you suggest, it won't end up updating the progress, which is > something you definitely need to see. But I think it's worthwhile to see the > names of the individual tests that are running. The way I've written it now, > you if `output_on_success` is False, you will only see one additional line, > which is the name of the test being run. I think that's useful and does not > add any noise to the output Ah, I was thinking there would still be ``` \r x out of y test suites processed ``` my bad. Could you change that to something like: ``` \r x out of y test suites processed - [test name] ``` with the carriage return (\r), so the screen doesn't scroll on success? http://reviews.llvm.org/D11816 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D11816: Allow dosep.py to print full output of dotest.py, even when dotest succeeds.
chaoren added inline comments. Comment at: test/dosep.py:142 @@ +141,3 @@ +if exit_status == 0: +# stdout does not have any useful information from 'dotest.py', only stderr does. +report_test_pass(name, output[1]) To clarify, I mean something like: ``` with output_lock: if output_on_success: print >> sys.stderr, output print >> sys.stderr, "[%s] PASSED" % name # silent update_progress() ``` in `report_test_pass`. and ``` sys.stderr.write("\r%*d out of %d test suites processed - [%s]\n" % (len(str(total_tests)), test_counter.value, total_tests), name) ``` in `update_progress`. http://reviews.llvm.org/D11816 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D11816: Allow dosep.py to print full output of dotest.py, even when dotest succeeds.
zturner updated this revision to Diff 31491. zturner added a comment. Merge the test name into the progress line. If we want to get overwritable lines we will need to use a stateful line printer that can clear the contents of the current line after issuing a carriage return. http://reviews.llvm.org/D11816 Files: test/dosep.py Index: test/dosep.py === --- test/dosep.py +++ test/dosep.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python """ Run the test suite using a separate process for each test file. @@ -67,6 +67,7 @@ test_counter = None total_tests = None dotest_options = None +output_on_success = False def setup_global_variables(lock, counter, total, options): global output_lock, test_counter, total_tests, dotest_options @@ -75,19 +76,34 @@ total_tests = total dotest_options = options -def update_status(name = None, command = None, output = None): +def report_test_failure(name, command, output): +global output_lock +with output_lock: +print >> sys.stderr, "\n" +print >> sys.stderr, output +print >> sys.stderr, "Command invoked: %s" % ' '.join(command) +update_progress("FAILED", name) + +def report_test_pass(name, output): +global output_lock, output_on_success +with output_lock: +if output_on_success: +print >> sys.stderr, "\n" +print >> sys.stderr, output +update_progress("PASSED", name) + +def update_progress(test_name, result): global output_lock, test_counter, total_tests with output_lock: -if output is not None: -print >> sys.stderr -print >> sys.stderr, "Failed test suite: %s" % name -print >> sys.stderr, "Command invoked: %s" % ' '.join(command) -print >> sys.stderr, "stdout:\n%s" % output[0] -print >> sys.stderr, "stderr:\n%s" % output[1] -sys.stderr.write("\r%*d out of %d test suites processed" % -(len(str(total_tests)), test_counter.value, total_tests)) +if test_name != None: +sys.stderr.write("\n[%s %s] - %d out of %d test suites processed" % +(result, test_name, test_counter.value, total_tests)) +else: +sys.stderr.write("\n%d out of %d test suites processed" % +(test_counter.value, total_tests)) test_counter.value += 1 -sys.stderr.flush() +sys.stdout.flush() +sys.stderr.flush() def parse_test_results(output): passes = 0 @@ -126,7 +142,11 @@ output = process.communicate() exit_status = process.returncode passes, failures = parse_test_results(output) -update_status(name, command, output if exit_status != 0 else None) +if exit_status == 0: +# stdout does not have any useful information from 'dotest.py', only stderr does. +report_test_pass(name, output[1]) +else: +report_test_failure(name, command, output[1]) return exit_status, passes, failures def process_dir(root, files, test_root, dotest_argv): @@ -194,11 +214,11 @@ test_work_items.append((root, files, test_directory, dotest_argv)) global output_lock, test_counter, total_tests -output_lock = multiprocessing.Lock() +output_lock = multiprocessing.RLock() total_tests = len(test_work_items) test_counter = multiprocessing.Value('i', 0) print >> sys.stderr, "Testing: %d tests, %d threads" % (total_tests, num_threads) -update_status() +update_progress(None, None) # Run the items, either in a pool (for multicore speedup) or # calling each individually. @@ -327,6 +347,12 @@ dest='dotest_options', help="""The options passed to 'dotest.py' if specified.""") +parser.add_option('-s', '--output-on-success', + action='store_true', + dest='output_on_success', + default=False, + help="""Print full output of 'dotest.py' even when it succeeds.""") + parser.add_option('-t', '--threads', type='int', dest='num_threads', @@ -340,6 +366,8 @@ parser = dotest_args.create_parser() global dotest_options +global output_on_success +output_on_success = opts.output_on_success dotest_options = dotest_args.parse_args(parser, dotest_argv) if not dotest_options.s: ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D11816: Allow dosep.py to print full output of dotest.py, even when dotest succeeds.
chaoren accepted this revision. chaoren added a comment. This revision is now accepted and ready to land. LGTM. I'll do the overwritable lines in a follow up patch. You don't really need a stateful printer, just need to get the length of the longest test name. http://reviews.llvm.org/D11816 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D11825: Add -latomic to Android mips build to avoid http://b.android.com/182094.
chaoren created this revision. chaoren added a reviewer: ovyalov. chaoren added a subscriber: lldb-commits. Herald added subscribers: srhines, danalbert, tberghammer. http://reviews.llvm.org/D11825 Files: cmake/platforms/Android.cmake Index: cmake/platforms/Android.cmake === --- cmake/platforms/Android.cmake +++ cmake/platforms/Android.cmake @@ -107,6 +107,9 @@ # Temporary workaround for static linking with the latest API. set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -DANDROID_ARM_BUILD_STATIC" ) endif() +elseif( ANDROID_ABI STREQUAL "mips" ) + # http://b.android.com/182094 + set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -latomic" ) endif() if( NOT LLVM_BUILD_STATIC ) Index: cmake/platforms/Android.cmake === --- cmake/platforms/Android.cmake +++ cmake/platforms/Android.cmake @@ -107,6 +107,9 @@ # Temporary workaround for static linking with the latest API. set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -DANDROID_ARM_BUILD_STATIC" ) endif() +elseif( ANDROID_ABI STREQUAL "mips" ) + # http://b.android.com/182094 + set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -latomic" ) endif() if( NOT LLVM_BUILD_STATIC ) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D11816: Allow dosep.py to print full output of dotest.py, even when dotest succeeds.
zturner added a comment. Dawn are you ok with this? I believe this fixes your issue, so i want to make sure before I commit. http://reviews.llvm.org/D11816 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D11825: Add -latomic to Android mips build to avoid http://b.android.com/182094.
This revision was automatically updated to reflect the committed changes. Closed by commit rL244298: Add -latomic to Android mips build to avoid http://b.android.com/182094. (authored by chaoren). Changed prior to commit: http://reviews.llvm.org/D11825?vs=31493&id=31494#toc Repository: rL LLVM http://reviews.llvm.org/D11825 Files: lldb/trunk/cmake/platforms/Android.cmake Index: lldb/trunk/cmake/platforms/Android.cmake === --- lldb/trunk/cmake/platforms/Android.cmake +++ lldb/trunk/cmake/platforms/Android.cmake @@ -107,6 +107,9 @@ # Temporary workaround for static linking with the latest API. set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -DANDROID_ARM_BUILD_STATIC" ) endif() +elseif( ANDROID_ABI STREQUAL "mips" ) + # http://b.android.com/182094 + set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -latomic" ) endif() if( NOT LLVM_BUILD_STATIC ) Index: lldb/trunk/cmake/platforms/Android.cmake === --- lldb/trunk/cmake/platforms/Android.cmake +++ lldb/trunk/cmake/platforms/Android.cmake @@ -107,6 +107,9 @@ # Temporary workaround for static linking with the latest API. set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -DANDROID_ARM_BUILD_STATIC" ) endif() +elseif( ANDROID_ABI STREQUAL "mips" ) + # http://b.android.com/182094 + set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -latomic" ) endif() if( NOT LLVM_BUILD_STATIC ) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D11825: Add -latomic to Android mips build to avoid http://b.android.com/182094.
ovyalov added inline comments. Comment at: lldb/trunk/cmake/platforms/Android.cmake:110 @@ -109,1 +109,3 @@ endif() +elseif( ANDROID_ABI STREQUAL "mips" ) + # http://b.android.com/182094 Do we need the same workaround for mips64? Repository: rL LLVM http://reviews.llvm.org/D11825 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D11825: Add -latomic to Android mips build to avoid http://b.android.com/182094.
chaoren marked an inline comment as done. Comment at: lldb/trunk/cmake/platforms/Android.cmake:110 @@ -109,1 +109,3 @@ endif() +elseif( ANDROID_ABI STREQUAL "mips" ) + # http://b.android.com/182094 ovyalov wrote: > Do we need the same workaround for mips64? Nope. Repository: rL LLVM http://reviews.llvm.org/D11825 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits