summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/lldbinline.py
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2018-09-25 20:20:13 +0000
committerVedant Kumar <vsk@apple.com>2018-09-25 20:20:13 +0000
commit75606b285c14d9fe6d61b64143dec63fc83b794b (patch)
treea5ad115050f46f94210017ebe073b81d0e25443f /lldb/packages/Python/lldbsuite/test/lldbinline.py
parentffa72ef9031f19ecf00c68efd46377a0cb52eff9 (diff)
downloadbcm5719-llvm-75606b285c14d9fe6d61b64143dec63fc83b794b.tar.gz
bcm5719-llvm-75606b285c14d9fe6d61b64143dec63fc83b794b.zip
[lldbinline] Set directory attribute on test-specific classes
Set the "mydir" attribute of an inline test on the test-specific class, instead of on the base InlineTest class. This makes it possible to run dotest.py on a directory containing inline tests. This wasn't really possible prior to this patch, because what would happen is that one test would just run over and over again, even though the test infrastructure would claim that different tests were being run. Example: The test infrastructure claimed that all of these different tests were passing, which couldn't be true -- $ ./bin/lldb-dotest /Users/vsk/src/tailcall/lldb/test/testcases/functionalities/tail_call_frames/ -G dwarf -t 2>&1 | grep PASS PASS: LLDB (/Users/vsk/src/builds/tailcall-RA/bin/clang-8-x86_64) :: test_dwarf (lldbsuite.test.lldbtest.TestDisambiguateTailCallSeq) PASS: LLDB (/Users/vsk/src/builds/tailcall-RA/bin/clang-8-x86_64) :: test_dwarf (lldbsuite.test.lldbtest.TestArtificialFrameStepOutMessage) PASS: LLDB (/Users/vsk/src/builds/tailcall-RA/bin/clang-8-x86_64) :: test_dwarf (lldbsuite.test.lldbtest.TestAmbiguousTailCallSeq1) PASS: LLDB (/Users/vsk/src/builds/tailcall-RA/bin/clang-8-x86_64) :: test_dwarf (lldbsuite.test.lldbtest.TestDisambiguatePathsToCommonSink) PASS: LLDB (/Users/vsk/src/builds/tailcall-RA/bin/clang-8-x86_64) :: test_dwarf (lldbsuite.test.lldbtest.TestDisambiguateCallSite) PASS: LLDB (/Users/vsk/src/builds/tailcall-RA/bin/clang-8-x86_64) :: test_dwarf (lldbsuite.test.lldbtest.TestUnambiguousTailCalls) PASS: LLDB (/Users/vsk/src/builds/tailcall-RA/bin/clang-8-x86_64) :: test_dwarf (lldbsuite.test.lldbtest.TestAmbiguousTailCallSeq2) RESULT: PASSED (7 passes, 0 failures, 0 errors, 24 skipped, 0 expected failures, 0 unexpected successes) ... because it wasn't even looking at some of these tests: $ ./bin/lldb-dotest /Users/vsk/src/tailcall/lldb/test/testcases/functionalities/tail_call_frames/ -G dwarf -t 2>&1 | grep "Change dir" Change dir to: /Users/vsk/src/tailcall/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2 Change dir to: /Users/vsk/src/tailcall/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2 Change dir to: /Users/vsk/src/tailcall/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2 Change dir to: /Users/vsk/src/tailcall/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support Change dir to: /Users/vsk/src/tailcall/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2 Change dir to: /Users/vsk/src/tailcall/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_or_return Change dir to: /Users/vsk/src/tailcall/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2 Change dir to: /Users/vsk/src/tailcall/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2 Change dir to: /Users/vsk/src/tailcall/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2 E.g it was only building one of them: $ ls lldb-test-build.noindex/functionalities/tail_call_frames/                         ambiguous_tail_call_seq2 Differential Revision: https://reviews.llvm.org/D52516 llvm-svn: 343023
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lldbinline.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/lldbinline.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lldbinline.py b/lldb/packages/Python/lldbsuite/test/lldbinline.py
index bb925ef908f..c01fef00fe4 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbinline.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbinline.py
@@ -195,7 +195,6 @@ def MakeInlineTest(__file, __globals, decorators=None):
# Derive the test name from the current file name
file_basename = os.path.basename(__file)
- InlineTest.mydir = TestBase.compute_mydir(__file)
test_name, _ = os.path.splitext(file_basename)
@@ -209,4 +208,5 @@ def MakeInlineTest(__file, __globals, decorators=None):
# Keep track of the original test filename so we report it
# correctly in test results.
test_class.test_filename = __file
+ test_class.mydir = TestBase.compute_mydir(__file)
return test_class
OpenPOWER on IntegriCloud