hanchenye-llvm-project/lldb
Vedant Kumar 75606b285c [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
2018-09-25 20:20:13 +00:00
..
cmake [cmake] Add option to skip building lldb-server 2018-08-23 18:05:45 +00:00
docs Enable AUTOBRIEF in doxygen configuration. 2018-05-02 16:55:16 +00:00
examples Update cmdtemplate.py to use best pratices. 2018-06-22 23:34:24 +00:00
include/lldb Move architecture-specific address adjustment to architecture plugins 2018-09-21 18:56:44 +00:00
lit [lldb-mi] Fix hanging of target-select-so-path.test 2018-09-24 19:10:48 +00:00
lldb.xcodeproj [DataFormatters] Add formatter for C++17 std::variant 2018-09-19 18:07:05 +00:00
lldb.xcworkspace Fix a typo in the gtest build target for Debug configuration. 2018-04-10 17:49:56 +00:00
packages/Python/lldbsuite [lldbinline] Set directory attribute on test-specific classes 2018-09-25 20:20:13 +00:00
resources Fix up Info.plist when building LLDB.framework with CMake 2018-06-19 02:59:30 +00:00
scripts [Swig] Merge typemaps with same bodies 2018-09-25 10:30:32 +00:00
source Replace boolean parameter with enum value according r342633 2018-09-25 17:59:44 +00:00
test Allow use of self.filecheck in LLDB tests (c.f self.expect) 2018-09-18 19:31:47 +00:00
third_party/Python/module
tools [NFC] Turn "load dependent files" boolean into an enum 2018-09-20 09:09:05 +00:00
unittests Add NativeProcessProtocol unit tests 2018-09-24 12:11:04 +00:00
utils [CMake] Unify and relayer testing 2018-05-03 16:54:10 +00:00
www Add docs for scripted breakpoint resolvers 2018-09-17 21:55:46 +00:00
.arcconfig
.clang-format
.gitignore [dotest] Remove crashinfo hook 2018-01-10 10:18:47 +00:00
CMakeLists.txt Allow use of self.filecheck in LLDB tests (c.f self.expect) 2018-09-18 19:31:47 +00:00
CODE_OWNERS.txt Fix/unify the spelling of Objective-C. 2018-06-13 16:21:24 +00:00
INSTALL.txt
LICENSE.TXT
use_lldb_suite_root.py