Yea that's probably what I was thinking of. Can make a similar variable for lldb_test_root as you've done. Feel free to put other suite-wide globals in there in the future as needed, it's a useful way to allow everything in the package access to a common set of stuff.
On Sun, Dec 6, 2015 at 10:24 PM Todd Fiala <todd.fi...@gmail.com> wrote: > I do see the lldbsuite.lldb_root var but didn't see an > lldbsuite.lldb_test_root var. I added one and switched over to it here: > > r254894 > > Let me know if that covers what you were thinking. I'm happy to have a > place to stick the var :-) I'm thinking I may have other places that > construct that, I'll replace those as I find them. > > -Todd > > On Sun, Dec 6, 2015 at 10:02 PM, Todd Fiala <todd.fi...@gmail.com> wrote: > >> Oh I'll have a look, thanks. >> >> On Sun, Dec 6, 2015 at 7:51 PM, Zachary Turner <ztur...@google.com> >> wrote: >> >>> >>> >>> On Sun, Dec 6, 2015 at 7:13 PM Todd Fiala via lldb-commits < >>> lldb-commits@lists.llvm.org> wrote: >>> >>>> Author: tfiala >>>> Date: Sun Dec 6 21:10:02 2015 >>>> New Revision: 254890 >>>> >>>> URL: http://llvm.org/viewvc/llvm-project?rev=254890&view=rev >>>> Log: >>>> Move test summary counts to end; simplify issue detail line >>>> >>>> Test summary counts now show at the end, with issue details >>>> above. >>>> >>>> Issue details now print "ISSUE_TYPE: test method (relative path)". >>>> Relative paths are relative to the >>>> packages/Python/lldbsuite/test directory. >>>> >>>> Sample output: >>>> >>>> test/dotest.py --executable `pwd`/build/Debug/lldb --results-formatter >>>> lldbsuite.test.basic_results_formatter.BasicResultsFormatter --threads 12 >>>> Testing: 415 test suites, 12 threads >>>> 415 out of 415 test suites processed - TestLldbGdbServer.py >>>> Test Results >>>> Total Test Methods Run (excluding reruns): 2470 >>>> Test Method rerun count: 0 >>>> >>>> Details: >>>> UNEXPECTED SUCCESS: test_symbol_name_dsym >>>> (functionalities/completion/TestCompletion.py) >>>> UNEXPECTED SUCCESS: test_symbol_name_dwarf >>>> (functionalities/completion/TestCompletion.py) >>>> >>>> =================== >>>> Test Result Summary >>>> =================== >>>> Success: 1329 >>>> Expected Failure: 79 >>>> Failure: 0 >>>> Error: 0 >>>> Unexpected Success: 2 >>>> Skip: 1060 >>>> >>>> Modified: >>>> lldb/trunk/packages/Python/lldbsuite/test/basic_results_formatter.py >>>> >>>> Modified: >>>> lldb/trunk/packages/Python/lldbsuite/test/basic_results_formatter.py >>>> URL: >>>> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/basic_results_formatter.py?rev=254890&r1=254889&r2=254890&view=diff >>>> >>>> ============================================================================== >>>> --- >>>> lldb/trunk/packages/Python/lldbsuite/test/basic_results_formatter.py >>>> (original) >>>> +++ >>>> lldb/trunk/packages/Python/lldbsuite/test/basic_results_formatter.py Sun >>>> Dec 6 21:10:02 2015 >>>> @@ -9,6 +9,11 @@ normal LLDB test run output when no othe >>>> """ >>>> from __future__ import print_function >>>> >>>> +# Python system includes >>>> +import os >>>> + >>>> +# Our imports >>>> + >>>> from . import test_results >>>> >>>> >>>> @@ -200,14 +205,18 @@ class BasicResultsFormatter(test_results >>>> print_matching_tests = category[2] >>>> detail_label = category[3] >>>> >>>> + test_base_dir = os.path.realpath(os.path.dirname(__file__)) >>>> >>> This can also be done now with `lldbsuite.lldb_test_root`. Or something >>> very similar, I might be off on the variable name, but the idea is the >>> same. We should probably use that wherever possible although you don't >>> have to change this if you don't want to, just keep it in mind for the >>> future. The nice thing about it is that it allows you to easily move code >>> around without breaking this. For example if you move this code to a >>> formatters/ directory as we proposed, this line will break, but using >>> `lldbsuite.test_root` won't. >>> >> >> >> >> -- >> -Todd >> > > > > -- > -Todd >
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits