[PATCH] D15870: [test-suite] Add CMake option to use host-timeit

Chad Rosier via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 4 13:51:54 PST 2016


mcrosier created this revision.
mcrosier added a reviewer: MatzeB.
mcrosier added a subscriber: llvm-commits.
mcrosier set the repository for this revision to rL LLVM.

This is intended to be used in the case of cross-compiling to run under
an emulator. CMake host-compiles timeit and fpcmp for use in building
the rest of the test-suite, but target-compiles timeit-target so that
lit can time test execution. This is normally fine, except when
running under an emulator, as RunSafely.sh uses the timeit argument
before any run-under scripts.

This change adds the CMake variable TEST_SUITE_HOST_TIMEIT which, if
defined, will tell lit to use the host-compiled timeit instead of the
target-compiled timeit-target when timing test execution.


Repository:
  rL LLVM

http://reviews.llvm.org/D15870

Files:
  CMakeLists.txt
  lit.cfg
  lit.site.cfg.in

Index: lit.site.cfg.in
===================================================================
--- lit.site.cfg.in
+++ lit.site.cfg.in
@@ -7,5 +7,6 @@
 config.remote_user = "@TEST_SUITE_REMOTE_USER@"
 config.remote_port = "@TEST_SUITE_REMOTE_PORT@"
 config.run_under = "@TEST_SUITE_RUN_UNDER@"
+config.host_timeit = "@TEST_SUITE_HOST_TIMEIT@"
 
 lit_config.load_config(config, "@CMAKE_SOURCE_DIR@/lit.cfg")
Index: lit.cfg
===================================================================
--- lit.cfg
+++ lit.cfg
@@ -136,6 +136,8 @@
         if stdout is not None or stderr is not None:
             raise Exception("separate stdout/stderr redirection not possible with traditional output")
     timeit = "%s/tools/timeit-target" % config.test_source_root
+    if config.host_timeit:
+        timeit = "%s/tools/timeit" % config.test_source_root
     timeout = "7200"
     if stdin is None:
         stdin = "/dev/null"
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -46,6 +46,9 @@
 # Run Under configuration for RunSafely.sh (will be set in lit.site.cfg)
 set(TEST_SUITE_RUN_UNDER "" CACHE STRING "RunSafely.sh run-under (-u) parameter")
 
+# Use host-compiled timeit instead of target-compiled timeit
+set(TEST_SUITE_HOST_TIMEIT "" CACHE STRING "Use host-compiled timeit instead of target-compiled timeit")
+
 # run type/benchmark size configuration (mostly for SPEC at the moment)
 set(TEST_SUITE_RUN_TYPE "train" CACHE STRING
     "Type of benchmark inputs (may be test,train or ref)")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15870.43921.patch
Type: text/x-patch
Size: 1571 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160104/babe6aab/attachment.bin>


More information about the llvm-commits mailing list