[PATCH] D132438: [runtimes] Use a response file for runtimes test suites
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 12 01:02:33 PDT 2022
This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rG2a66abb17ed3: [runtimes] Use a response file for runtimes test suites (authored by phosek).
Changed prior to commit:
https://reviews.llvm.org/D132438?vs=455100&id=467038#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132438/new/
https://reviews.llvm.org/D132438
Files:
llvm/runtimes/CMakeLists.txt
runtimes/CMakeLists.txt
runtimes/Tests.cmake.in
Index: runtimes/Tests.cmake.in
===================================================================
--- runtimes/Tests.cmake.in
+++ /dev/null
@@ -1,3 +0,0 @@
-set(SUB_LIT_TESTSUITES @LLVM_RUNTIMES_LIT_TESTSUITES@)
-set(SUB_LIT_PARAMS @LLVM_RUNTIMES_LIT_PARAMS@)
-set(SUB_LIT_EXTRA_ARGS @LLVM_RUNTIMES_LIT_EXTRA_ARGS@)
Index: runtimes/CMakeLists.txt
===================================================================
--- runtimes/CMakeLists.txt
+++ runtimes/CMakeLists.txt
@@ -244,15 +244,12 @@
${CMAKE_CURRENT_BINARY_DIR}/llvm-lit)
endif()
- if(LLVM_RUNTIMES_TARGET)
- configure_file(
- ${CMAKE_CURRENT_SOURCE_DIR}/Tests.cmake.in
- ${LLVM_BINARY_DIR}/runtimes/${LLVM_RUNTIMES_TARGET}/Tests.cmake)
- else()
- configure_file(
- ${CMAKE_CURRENT_SOURCE_DIR}/Tests.cmake.in
- ${LLVM_BINARY_DIR}/runtimes/Tests.cmake)
- endif()
+ get_property(LLVM_RUNTIMES_LIT_TESTSUITES GLOBAL PROPERTY LLVM_RUNTIMES_LIT_TESTSUITES)
+ string(REPLACE ";" "\n" LLVM_RUNTIMES_LIT_TESTSUITES "${LLVM_RUNTIMES_LIT_TESTSUITES}")
+ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/lit.tests ${LLVM_RUNTIMES_LIT_TESTSUITES})
+else()
+ # Create empty files so the parent build can use these unconditionally.
+ file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/lit.tests)
endif()
get_property(SUB_COMPONENTS GLOBAL PROPERTY SUB_COMPONENTS)
Index: llvm/runtimes/CMakeLists.txt
===================================================================
--- llvm/runtimes/CMakeLists.txt
+++ llvm/runtimes/CMakeLists.txt
@@ -209,13 +209,7 @@
endforeach()
if(LLVM_INCLUDE_TESTS)
- include(${LLVM_BINARY_DIR}/runtimes/Tests.cmake OPTIONAL RESULT_VARIABLE have_tests)
- set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${LLVM_BINARY_DIR}/runtimes/Tests.cmake)
- if(have_tests)
- set_property(GLOBAL APPEND PROPERTY LLVM_ALL_LIT_TESTSUITES ${SUB_LIT_TESTSUITES})
- set_property(GLOBAL APPEND PROPERTY LLVM_ALL_LIT_PARAMS ${SUB_LIT_PARAMS})
- set_property(GLOBAL APPEND PROPERTY LLVM_ALL_LIT_EXTRA_ARGS ${SUB_LIT_EXTRA_ARGS})
- endif()
+ set_property(GLOBAL APPEND PROPERTY LLVM_ALL_LIT_TESTSUITES "@${LLVM_BINARY_DIR}/runtimes/runtimes-bins/lit.tests")
list(APPEND test_targets runtimes-test-depends check-runtimes)
endif()
@@ -291,13 +285,7 @@
endforeach()
if(LLVM_INCLUDE_TESTS)
- include(${LLVM_BINARY_DIR}/runtimes/${name}/Tests.cmake OPTIONAL RESULT_VARIABLE have_tests)
- set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${LLVM_BINARY_DIR}/runtimes/${name}/Tests.cmake)
- if(have_tests)
- set_property(GLOBAL APPEND PROPERTY LLVM_ALL_LIT_TESTSUITES ${SUB_LIT_TESTSUITES})
- set_property(GLOBAL APPEND PROPERTY LLVM_ALL_LIT_PARAMS ${SUB_LIT_PARAMS})
- set_property(GLOBAL APPEND PROPERTY LLVM_ALL_LIT_EXTRA_ARGS ${SUB_LIT_EXTRA_ARGS})
- endif()
+ set_property(GLOBAL APPEND PROPERTY LLVM_ALL_LIT_TESTSUITES "@${LLVM_BINARY_DIR}/runtimes/runtimes-${name}-bins/lit.tests")
set(runtimes-test-depends-${name} runtimes-test-depends)
set(check-runtimes-${name} check-runtimes)
list(APPEND ${name}_test_targets runtimes-test-depends-${name} check-runtimes-${name})
@@ -490,5 +478,7 @@
foreach(target ${test_targets} ${SUB_CHECK_TARGETS})
add_dependencies(${target} ${RUNTIMES_TEST_DEPENDS})
endforeach()
+
+ set_property(GLOBAL APPEND PROPERTY LLVM_ALL_ADDITIONAL_TEST_TARGETS runtimes ${RUNTIMES_TEST_DEPENDS})
endif()
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132438.467038.patch
Type: text/x-patch
Size: 3477 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221012/5e987cf4/attachment.bin>
More information about the llvm-commits
mailing list