[PATCH] D33048: [CMake] runtimes test targets need to depend on LLVM tools

Chris Bieneman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 10 09:09:04 PDT 2017


beanz created this revision.
Herald added a subscriber: mgorny.

Many of the test cases in the runtimes require LLVM's testing tools, to facilitate this working as expected we need to have all the test targets in the runtimes depend on the LLVM testing tools used in the runtimes.

The list of tools I've added here may not be the full or minimally correct list of tools, but this patch is a step in the right direction.


https://reviews.llvm.org/D33048

Files:
  runtimes/CMakeLists.txt


Index: runtimes/CMakeLists.txt
===================================================================
--- runtimes/CMakeLists.txt
+++ runtimes/CMakeLists.txt
@@ -249,8 +249,10 @@
     foreach(runtime_name ${runtime_names})
       list(APPEND extra_targets
         ${runtime_name}
-        install-${runtime_name}
-        check-${runtime_name})
+        install-${runtime_name})
+      if(LLVM_INCLUDE_TESTS)
+        list(APPEND test_targets check-${runtime_name})
+      endif()
     endforeach()
 
     if(LLVM_INCLUDE_TESTS)
@@ -290,6 +292,21 @@
     if(LLVM_INCLUDE_TESTS)
       set_property(GLOBAL APPEND PROPERTY LLVM_ADDITIONAL_TEST_DEPENDS runtimes-test-depends)
       set_property(GLOBAL APPEND PROPERTY LLVM_ADDITIONAL_TEST_TARGETS check-runtimes)
+
+      set(RUNTIMES_TEST_DEPENDS
+          FileCheck
+          count
+          llvm-nm
+          llvm-objdump
+          llvm-xray
+          not
+          obj2yaml
+          sancov
+          sanstats
+        )
+      foreach(target ${test_targets} ${SUB_COMPONENT_CHECK_TARGETS})
+        add_dependencies(${target} ${RUNTIMES_TEST_DEPENDS})
+      endforeach()
     endif()
   endif()
 endif()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33048.98474.patch
Type: text/x-patch
Size: 1165 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170510/5bafde3a/attachment.bin>


More information about the llvm-commits mailing list