From fdfeefd6c29b2f26b69c63bd0a90a9915b94d956 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Tue, 24 Apr 2018 10:51:44 +0000 Subject: [dotest] Make the set of tests independent of the test configuration Summary: In the magic test duplicator, we were making the decision whether to create a test variant based on the compiler and the target platform. This meant that the set of known tests was different for each test configuration. This patch makes the set of generated test variants static and handles the skipping via runtime checks instead. This is more consistent with how we do other test-skipping decision (e.g. for libc++ tests), and makes it easier to expose the full set of tests to lit, which now does not need to know anything about what things can potentially cause tests to appear or disappear. Reviewers: JDevlieghere, aprantl Subscribers: eraman, lldb-commits Differential Revision: https://reviews.llvm.org/D45949 llvm-svn: 330708 --- lldb/packages/Python/lldbsuite/test/lldbinline.py | 25 ++++++++--------------- 1 file changed, 8 insertions(+), 17 deletions(-) (limited to 'lldb/packages/Python/lldbsuite/test/lldbinline.py') diff --git a/lldb/packages/Python/lldbsuite/test/lldbinline.py b/lldb/packages/Python/lldbsuite/test/lldbinline.py index f180d146144..f19bba4016f 100644 --- a/lldb/packages/Python/lldbsuite/test/lldbinline.py +++ b/lldb/packages/Python/lldbsuite/test/lldbinline.py @@ -241,23 +241,14 @@ def MakeInlineTest(__file, __globals, decorators=None): test = type(test_name, (InlineTest,), {'using_dsym': None}) test.name = test_name - target_platform = lldb.DBG.GetSelectedPlatform().GetTriple().split('-')[2] - if test_categories.is_supported_on_platform( - "dsym", target_platform, configuration.compiler): - test.test_with_dsym = ApplyDecoratorsToFunction( - test._InlineTest__test_with_dsym, decorators) - if test_categories.is_supported_on_platform( - "dwarf", target_platform, configuration.compiler): - test.test_with_dwarf = ApplyDecoratorsToFunction( - test._InlineTest__test_with_dwarf, decorators) - if test_categories.is_supported_on_platform( - "dwo", target_platform, configuration.compiler): - test.test_with_dwo = ApplyDecoratorsToFunction( - test._InlineTest__test_with_dwo, decorators) - if test_categories.is_supported_on_platform( - "gmodules", target_platform, configuration.compiler): - test.test_with_gmodules = ApplyDecoratorsToFunction( - test._InlineTest__test_with_gmodules, decorators) + test.test_with_dsym = ApplyDecoratorsToFunction( + test._InlineTest__test_with_dsym, decorators) + test.test_with_dwarf = ApplyDecoratorsToFunction( + test._InlineTest__test_with_dwarf, decorators) + test.test_with_dwo = ApplyDecoratorsToFunction( + test._InlineTest__test_with_dwo, decorators) + test.test_with_gmodules = ApplyDecoratorsToFunction( + test._InlineTest__test_with_gmodules, decorators) # Add the test case to the globals, and hide InlineTest __globals.update({test_name: test}) -- cgit v1.2.3