[compiler-rt] r312094 - Fix for TSan unit-tests:

George Karpenkov via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 29 19:24:32 PDT 2017


Author: george.karpenkov
Date: Tue Aug 29 19:24:31 2017
New Revision: 312094

URL: http://llvm.org/viewvc/llvm-project?rev=312094&view=rev
Log:
Fix for TSan unit-tests:

Previous refactoring has left unit-tests in a buggy state,
where they were not launched at all.

Modified:
    compiler-rt/trunk/lib/tsan/tests/CMakeLists.txt

Modified: compiler-rt/trunk/lib/tsan/tests/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/tests/CMakeLists.txt?rev=312094&r1=312093&r2=312094&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/tests/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/tsan/tests/CMakeLists.txt Tue Aug 29 19:24:31 2017
@@ -2,7 +2,7 @@ include_directories(../rtl)
 
 add_custom_target(TsanUnitTests)
 set_target_properties(TsanUnitTests PROPERTIES
-  FOLDER "TSan unittests")
+  FOLDER "Compiler-RT Tests")
 
 set(TSAN_UNITTEST_CFLAGS
   ${TSAN_CFLAGS}
@@ -49,9 +49,11 @@ endforeach()
 macro(add_tsan_unittest testname)
   cmake_parse_arguments(TEST "" "" "SOURCES;HEADERS" ${ARGN})
   if(UNIX)
-    foreach(arch ${ASAN_TEST_ARCH})
-      generate_compiler_rt_tests(TsanUnitTests ${testname} ${arch}
-        SOURCES ${TEST_SOURCES}
+    foreach(arch ${TSAN_TEST_ARCH})
+      set(TsanUnitTestsObjects)
+      generate_compiler_rt_tests(TsanUnitTestsObjects TsanUnitTests
+        "${testname}-${arch}-Test" ${arch}
+        SOURCES ${TEST_SOURCES} ${COMPILER_RT_GTEST_SOURCE}
         RUNTIME ${TSAN_TEST_RUNTIME}
         COMPILE_DEPS ${TEST_HEADERS} ${TSAN_RTL_HEADERS}
         DEPS gtest tsan




More information about the llvm-commits mailing list