[test-suite] r254545 - lit: Support RunSafely remote execution
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 2 13:10:41 PST 2015
Author: matze
Date: Wed Dec 2 15:10:41 2015
New Revision: 254545
URL: http://llvm.org/viewvc/llvm-project?rev=254545&view=rev
Log:
lit: Support RunSafely remote execution
Modified:
test-suite/trunk/CMakeLists.txt
test-suite/trunk/lit.cfg
test-suite/trunk/lit.site.cfg.in
Modified: test-suite/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/CMakeLists.txt?rev=254545&r1=254544&r2=254545&view=diff
==============================================================================
--- test-suite/trunk/CMakeLists.txt (original)
+++ test-suite/trunk/CMakeLists.txt Wed Dec 2 15:10:41 2015
@@ -32,6 +32,13 @@ This process created the file `CMakeCach
Please delete them.")
endif()
+# Remote configuration (will be set in lit.site.cfg)
+set(TEST_SUITE_REMOTE_CLIENT "ssh" CACHE STRING "Remote execution client")
+set(TEST_SUITE_REMOTE_HOST "" CACHE STRING "Remote execution host")
+set(TEST_SUITE_REMOTE_USER "" CACHE STRING "Remote execution user")
+set(TEST_SUITE_REMOTE_PORT "" CACHE STRING "Remote execution port")
+mark_as_advanced(TEST_SUITE_REMOTE_USER TEST_SUITE_REMOTE_PORT)
+
include(MakefileFunctions)
include(SingleMultiSource)
find_package(YACC)
Modified: test-suite/trunk/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/lit.cfg?rev=254545&r1=254544&r2=254545&view=diff
==============================================================================
--- test-suite/trunk/lit.cfg (original)
+++ test-suite/trunk/lit.cfg Wed Dec 2 15:10:41 2015
@@ -108,10 +108,19 @@ def prepareRunSafely(config, commandline
if stdout is not None or stderr is not None:
raise Exception("stdout/stderr redirection in combination with RunSafely not implemented yet")
- timeit = "%s/tools/timeit" % config.test_source_root
runsafely = "%s/RunSafely.sh" % config.test_suite_root
+ runsafely_prefix = [ runsafely ]
+ if config.remote_host:
+ runsafely_prefix += [ "-r", config.remote_host ]
+ if config.remote_user:
+ runsafely_prefix += [ "-l", config.remote_user ]
+ if config.remote_client:
+ runsafely_prefix += [ "-rc", config.remote_client ]
+ if config.remote_port:
+ runsafely_prefix += [ "-rp", config.remote_port ]
+ timeit = "%s/tools/timeit-target" % config.test_source_root
timeout = "7200"
- runsafely_prefix = [runsafely, "-t", timeit, timeout, stdin, outfile]
+ runsafely_prefix += [ "-t", timeit, timeout, stdin, outfile ]
new_commandline = " ".join(map(quote, runsafely_prefix + tokens))
return new_commandline
@@ -204,3 +213,5 @@ config.name = 'test-suite'
config.test_format = TestSuiteTest()
config.suffixes = ['.test']
config.excludes = ['ABI-Testsuite']
+if 'SSH_AUTH_SOCK' in os.environ:
+ config.environment['SSH_AUTH_SOCK'] = os.environ['SSH_AUTH_SOCK']
Modified: test-suite/trunk/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/lit.site.cfg.in?rev=254545&r1=254544&r2=254545&view=diff
==============================================================================
--- test-suite/trunk/lit.site.cfg.in (original)
+++ test-suite/trunk/lit.site.cfg.in Wed Dec 2 15:10:41 2015
@@ -2,5 +2,9 @@ import sys
config.test_source_root = "@CMAKE_BINARY_DIR@"
config.test_suite_root = "@CMAKE_SOURCE_DIR@"
+config.remote_client = "@TEST_SUITE_REMOTE_CLIENT@"
+config.remote_host = "@TEST_SUITE_REMOTE_HOST@"
+config.remote_user = "@TEST_SUITE_REMOTE_USER@"
+config.remote_port = "@TEST_SUITE_REMOTE_PORT@"
lit_config.load_config(config, "@CMAKE_SOURCE_DIR@/lit.cfg")
More information about the llvm-commits
mailing list