[Lldb-commits] [PATCH] D80518: [lldb] Make "inline" tests more configurable
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri May 29 02:41:19 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG2c22c1473569: [lldb] Make "inline" tests more configurable (authored by labath).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80518/new/
https://reviews.llvm.org/D80518
Files:
lldb/packages/Python/lldbsuite/test/lldbinline.py
lldb/test/API/functionalities/param_entry_vals/basic_entry_values/Makefile
lldb/test/API/functionalities/param_entry_vals/basic_entry_values/TestBasicEntryValues.py
Index: lldb/test/API/functionalities/param_entry_vals/basic_entry_values/TestBasicEntryValues.py
===================================================================
--- lldb/test/API/functionalities/param_entry_vals/basic_entry_values/TestBasicEntryValues.py
+++ lldb/test/API/functionalities/param_entry_vals/basic_entry_values/TestBasicEntryValues.py
@@ -3,9 +3,11 @@
from lldbsuite.test import lldbplatformutil
supported_archs = ["x86_64", "aarch64"]
-
-lldbinline.MakeInlineTest(__file__, globals(),
- [skipIf(archs=no_match(supported_archs)),
+decorators = [skipIf(archs=no_match(supported_archs)),
skipIf(compiler="clang", compiler_version=['<', '10.0']),
skipUnlessHasCallSiteInfo,
- skipIf(dwarf_version=['<', '4'])])
+ skipIf(dwarf_version=['<', '4'])]
+
+lldbinline.MakeInlineTest(__file__, globals(), decorators=decorators,
+ name="BasicEntryValues_V5",
+ build_dict=dict(CXXFLAGS_EXTRAS="-O2 -glldb"))
Index: lldb/test/API/functionalities/param_entry_vals/basic_entry_values/Makefile
===================================================================
--- lldb/test/API/functionalities/param_entry_vals/basic_entry_values/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-CXXFLAGS_EXTRAS := -O2 -glldb
-include Makefile.rules
Index: lldb/packages/Python/lldbsuite/test/lldbinline.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/lldbinline.py
+++ lldb/packages/Python/lldbsuite/test/lldbinline.py
@@ -120,7 +120,7 @@
def _test(self):
self.BuildMakefile()
- self.build()
+ self.build(dictionary=self._build_dict)
self.do_test()
def execute_user_command(self, __command):
@@ -190,24 +190,26 @@
return tmp
-def MakeInlineTest(__file, __globals, decorators=None):
+def MakeInlineTest(__file, __globals, decorators=None, name=None,
+ build_dict=None):
# Adjust the filename if it ends in .pyc. We want filenames to
# reflect the source python file, not the compiled variant.
if __file is not None and __file.endswith(".pyc"):
# Strip the trailing "c"
__file = __file[0:-1]
- # Derive the test name from the current file name
- file_basename = os.path.basename(__file)
-
- test_name, _ = os.path.splitext(file_basename)
+ if name is None:
+ # Derive the test name from the current file name
+ file_basename = os.path.basename(__file)
+ name, _ = os.path.splitext(file_basename)
test_func = ApplyDecoratorsToFunction(InlineTest._test, decorators)
# Build the test case
- test_class = type(test_name, (InlineTest,), dict(test=test_func, name=test_name))
+ test_class = type(name, (InlineTest,), dict(test=test_func,
+ name=name, _build_dict=build_dict))
# Add the test case to the globals, and hide InlineTest
- __globals.update({test_name: test_class})
+ __globals.update({name: test_class})
# Keep track of the original test filename so we report it
# correctly in test results.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80518.267151.patch
Type: text/x-patch
Size: 3104 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200529/ce18b67f/attachment-0001.bin>
More information about the lldb-commits
mailing list