Index: CMakeLists.txt =================================================================== --- CMakeLists.txt +++ CMakeLists.txt @@ -32,6 +32,13 @@ 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) Index: lit.cfg =================================================================== --- lit.cfg +++ lit.cfg @@ -108,10 +108,19 @@ 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.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'] Index: lit.site.cfg.in =================================================================== --- lit.site.cfg.in +++ lit.site.cfg.in @@ -2,5 +2,9 @@ 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")