[compiler-rt] r307844 - Add explicit CMake targets for ASan/TSan iOS Simulator testing and update the instructions how to run them.

Kuba Mracek via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 12 14:02:48 PDT 2017


Author: kuba.brecka
Date: Wed Jul 12 14:02:48 2017
New Revision: 307844

URL: http://llvm.org/viewvc/llvm-project?rev=307844&view=rev
Log:
Add explicit CMake targets for ASan/TSan iOS Simulator testing and update the instructions how to run them.


Modified:
    compiler-rt/trunk/test/asan/CMakeLists.txt
    compiler-rt/trunk/test/tsan/CMakeLists.txt

Modified: compiler-rt/trunk/test/asan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/CMakeLists.txt?rev=307844&r1=307843&r2=307844&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/CMakeLists.txt (original)
+++ compiler-rt/trunk/test/asan/CMakeLists.txt Wed Jul 12 14:02:48 2017
@@ -84,12 +84,13 @@ foreach(arch ${ASAN_TEST_ARCH})
 endforeach()
 
 # iOS and iOS simulator test suites
-# These are not added into "check-all", in order to run these tests, you have to
-# manually call (from the build directory).  They also require that an extra env
+# These are not added into "check-all", in order to run these tests, use
+# "check-asan-iossim-x86_64" and similar. They also require that an extra env
 # variable to select which iOS device or simulator to use, e.g.:
-# $ SANITIZER_IOSSIM_TEST_DEVICE_IDENTIFIER=BBE44C1C-8AAA-4000-8D06-91C89ED58172
-# $ ./bin/llvm-lit ./projects/compiler-rt/test/asan/IOSSimI386Config
+# SANITIZER_IOSSIM_TEST_DEVICE_IDENTIFIER="iPhone 6"
 if(APPLE)
+  set(EXCLUDE_FROM_ALL ON)
+
   set(ASAN_TEST_TARGET_CC ${COMPILER_RT_TEST_COMPILER})
   set(ASAN_TEST_IOS "1")
   pythonize_bool(ASAN_TEST_IOS)
@@ -108,6 +109,9 @@ if(APPLE)
       ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
       ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg
       )
+    add_lit_testsuite(check-asan-iossim-${arch} "AddressSanitizer iOS Simulator ${arch} tests"
+      ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/
+      DEPENDS ${ASAN_TEST_DEPS})
   endforeach()
 
   foreach (arch ${DARWIN_ios_ARCHS})
@@ -123,7 +127,12 @@ if(APPLE)
       ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
       ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg
       )
+    add_lit_testsuite(check-asan-ios-${arch} "AddressSanitizer iOS ${arch} tests"
+      ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/
+      DEPENDS ${ASAN_TEST_DEPS})
   endforeach()
+
+  set(EXCLUDE_FROM_ALL OFF)
 endif()
 
 # Add unit tests.

Modified: compiler-rt/trunk/test/tsan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/CMakeLists.txt?rev=307844&r1=307843&r2=307844&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/CMakeLists.txt (original)
+++ compiler-rt/trunk/test/tsan/CMakeLists.txt Wed Jul 12 14:02:48 2017
@@ -43,12 +43,13 @@ foreach(arch ${TSAN_TEST_ARCH})
 endforeach()
 
 # iOS and iOS simulator test suites
-# These are not added into "check-all", in order to run these tests, you have to
-# manually call (from the build directory).  They also require that an extra env
+# These are not added into "check-all", in order to run these tests, use
+# "check-tsan-iossim-x86_64" and similar. They also require an extra environment
 # variable to select which iOS device or simulator to use, e.g.:
-# $ SANITIZER_IOSSIM_TEST_DEVICE_IDENTIFIER=BBE44C1C-8AAA-4000-8D06-91C89ED58172
-# $ ./bin/llvm-lit ./projects/compiler-rt/test/tsan/IOSSimX86_64Config
+# SANITIZER_IOSSIM_TEST_DEVICE_IDENTIFIER="iPhone 6"
 if(APPLE)
+  set(EXCLUDE_FROM_ALL ON)
+
   set(TSAN_TEST_TARGET_CC ${COMPILER_RT_TEST_COMPILER})
   set(TSAN_TEST_IOS "1")
   pythonize_bool(TSAN_TEST_IOS)
@@ -65,6 +66,9 @@ if(APPLE)
     ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
     ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg
     )
+  add_lit_testsuite(check-tsan-iossim-${arch} "ThreadSanitizer iOS Simulator ${arch} tests"
+    ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/
+    DEPENDS ${TSAN_TEST_DEPS})
 
   set(arch "arm64")
   set(TSAN_TEST_IOSSIM "0")
@@ -78,6 +82,11 @@ if(APPLE)
     ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
     ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg
     )
+  add_lit_testsuite(check-tsan-ios-${arch} "ThreadSanitizer iOS Simulator ${arch} tests"
+    ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/
+    DEPENDS ${TSAN_TEST_DEPS})
+
+  set(EXCLUDE_FROM_ALL OFF)
 endif()
 
 if(COMPILER_RT_INCLUDE_TESTS)




More information about the llvm-commits mailing list