Skip to content

Commit

Permalink
[test-suite] Add the TEST_SUITE_EXE_WRAPPER option for cross-compiling.
Browse files Browse the repository at this point in the history
The value of variable TEST_SUITE_EXE_WRAPPER, if present, is passed to
RunSafely.sh 's -u parameter, to wrap the test execution within. This is mainly
intended to be used while cross-compiling to run under an emulator.

llvm-svn: 254765
  • Loading branch information
Chad Rosier committed Dec 4, 2015
1 parent d5461d6 commit d6189c4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ 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)

# 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")

include(MakefileFunctions)
include(SingleMultiSource)
find_package(YACC)
Expand Down
2 changes: 2 additions & 0 deletions lit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ def prepareRunSafely(config, commandline, outfile):
runsafely_prefix += [ "-rc", config.remote_client ]
if config.remote_port:
runsafely_prefix += [ "-rp", config.remote_port ]
if config.run_under:
runsafely_prefix += [ "-u", config.run_under ]
timeit = "%s/tools/timeit-target" % config.test_source_root
timeout = "7200"
runsafely_prefix += [ "-t", timeit, timeout, stdin, outfile ]
Expand Down
1 change: 1 addition & 0 deletions lit.site.cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ 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@"
config.run_under = "@TEST_SUITE_RUN_UNDER@"

lit_config.load_config(config, "@CMAKE_SOURCE_DIR@/lit.cfg")

0 comments on commit d6189c4

Please sign in to comment.