[PATCH] D16850: [sanitizer_common] Add suffix to lit testsuite name to distinguish subtargets.

Daniel Sanders via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 3 05:24:00 PST 2016


dsanders created this revision.
dsanders added a reviewer: samsonov.
dsanders added a subscriber: llvm-commits.

This fixes duplicate test names in the test results, so:
  PASS: SanitizerCommon-asan :: fopen_nullptr.c (304 of 431)
  PASS: SanitizerCommon-asan :: fopen_nullptr.c (305 of 431)
is now:
  PASS: SanitizerCommon-asan-i386-Linux :: fopen_nullptr.c (282 of 431)             
  PASS: SanitizerCommon-asan-x86_64-Linux :: fopen_nullptr.c (316 of 431)

http://reviews.llvm.org/D16850

Files:
  test/sanitizer_common/CMakeLists.txt
  test/sanitizer_common/lit.common.cfg
  test/sanitizer_common/lit.site.cfg.in

Index: test/sanitizer_common/lit.site.cfg.in
===================================================================
--- test/sanitizer_common/lit.site.cfg.in
+++ test/sanitizer_common/lit.site.cfg.in
@@ -2,6 +2,7 @@
 lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/test/lit.common.configured")
 
 # Tool-specific config options.
+config.name_suffix = "@SANITIZER_COMMON_TEST_CONFIG_SUFFIX@"
 config.tool_name = "@SANITIZER_COMMON_LIT_TEST_MODE@"
 config.target_cflags = "@SANITIZER_COMMON_TEST_TARGET_CFLAGS@"
 config.target_arch = "@SANITIZER_COMMON_TEST_TARGET_ARCH@"
Index: test/sanitizer_common/lit.common.cfg
===================================================================
--- test/sanitizer_common/lit.common.cfg
+++ test/sanitizer_common/lit.common.cfg
@@ -3,7 +3,7 @@
 # Setup source root.
 config.test_source_root = os.path.join(os.path.dirname(__file__), "TestCases")
 
-config.name = "SanitizerCommon-" + config.tool_name
+config.name = "SanitizerCommon-" + config.tool_name + config.name_suffix
 
 default_tool_options = []
 if config.tool_name == "asan":
Index: test/sanitizer_common/CMakeLists.txt
===================================================================
--- test/sanitizer_common/CMakeLists.txt
+++ test/sanitizer_common/CMakeLists.txt
@@ -36,6 +36,7 @@
       string(REPLACE ";" " " SANITIZER_COMMON_TEST_TARGET_CFLAGS "${SANITIZER_COMMON_TEST_TARGET_CFLAGS}")
     endif()
     set(CONFIG_NAME ${tool}-${arch}-${OS_NAME})
+    set(SANITIZER_COMMON_TEST_CONFIG_SUFFIX "-${arch}-${OS_NAME}")
     configure_lit_site_cfg(
       ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
       ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16850.46776.patch
Type: text/x-patch
Size: 1672 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160203/7b00df4a/attachment.bin>


More information about the llvm-commits mailing list