[test-suite] r340323 - cmake/litsupport: Always use timeit-target in lit; NFC
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 21 12:24:53 PDT 2018
Author: matze
Date: Tue Aug 21 12:24:53 2018
New Revision: 340323
URL: http://llvm.org/viewvc/llvm-project?rev=340323&view=rev
Log:
cmake/litsupport: Always use timeit-target in lit; NFC
Simplify things by always using timeit-target instead of switching
between timeit/timeit-target depending on the configuration.
Modified:
test-suite/trunk/cmake/modules/TestSuite.cmake
test-suite/trunk/litsupport/modules/timeit.py
test-suite/trunk/tools/CMakeLists.txt
Modified: test-suite/trunk/cmake/modules/TestSuite.cmake
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/cmake/modules/TestSuite.cmake?rev=340323&r1=340322&r2=340323&view=diff
==============================================================================
--- test-suite/trunk/cmake/modules/TestSuite.cmake (original)
+++ test-suite/trunk/cmake/modules/TestSuite.cmake Tue Aug 21 12:24:53 2018
@@ -52,10 +52,7 @@ endfunction()
# usually do not need to call this directly when using `llvm_test_executable`
# or `llvm_test_library`.
function(test_suite_add_build_dependencies target)
- if(NOT TEST_SUITE_USE_PERF)
- add_dependencies(${target} timeit-target)
- endif()
- add_dependencies(${target} timeit-host fpcmp-host)
+ add_dependencies(${target} build-timeit build-timeit-target build-fpcmp)
endfunction()
# Internal function that transforms a list of flags to a string and appends
Modified: test-suite/trunk/litsupport/modules/timeit.py
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/litsupport/modules/timeit.py?rev=340323&r1=340322&r2=340323&view=diff
==============================================================================
--- test-suite/trunk/litsupport/modules/timeit.py (original)
+++ test-suite/trunk/litsupport/modules/timeit.py Tue Aug 21 12:24:53 2018
@@ -10,9 +10,7 @@ def _mutateCommandLine(context, commandl
config = context.config
cmd = shellcommand.parse(commandline)
- timeit = "%s/tools/timeit" % config.test_source_root
- if config.remote_host:
- timeit = "%s/tools/timeit-target" % config.test_source_root
+ timeit = "%s/tools/timeit-target" % config.test_source_root
args = ["--limit-core", "0"]
args += ["--limit-cpu", "7200"]
args += ["--timeout", "7200"]
Modified: test-suite/trunk/tools/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/tools/CMakeLists.txt?rev=340323&r1=340322&r2=340323&view=diff
==============================================================================
--- test-suite/trunk/tools/CMakeLists.txt (original)
+++ test-suite/trunk/tools/CMakeLists.txt Tue Aug 21 12:24:53 2018
@@ -5,16 +5,23 @@
include(Host)
-llvm_add_host_executable(fpcmp-host fpcmp fpcmp.c)
+llvm_add_host_executable(build-fpcmp fpcmp fpcmp.c)
option(TEST_SUITE_USE_PERF "Use perf (timeit.sh) instead of timeit.c" Off)
if(TEST_SUITE_USE_PERF)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/timeit
- COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/timeit.sh ${CMAKE_CURRENT_BINARY_DIR}/timeit
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/timeit.sh ${CMAKE_CURRENT_BINARY_DIR}/timeit
COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR}/timeit
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/timeit.sh)
- add_custom_target(timeit-host DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/timeit)
+ add_custom_target(build-timeit DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/timeit)
+
+ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/timeit-target
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/timeit.sh ${CMAKE_CURRENT_BINARY_DIR}/timeit-target
+ COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR}/timeit-target
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/timeit.sh)
+ add_custom_target(build-timeit-target DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/timeit-target)
else()
add_executable(timeit-target ${CMAKE_CURRENT_SOURCE_DIR}/timeit.c)
- llvm_add_host_executable(timeit-host timeit timeit.c)
+ add_executable(build-timeit-target ALIAS timeit-target)
+ llvm_add_host_executable(build-timeit timeit timeit.c)
endif()
More information about the llvm-commits
mailing list