[Git][ghc/ghc][wip/angerman/cross-test-suite] Fix test-wrapper in python, so hadrian gets the benefit.
Moritz Angermann
gitlab at gitlab.haskell.org
Wed Jul 15 12:36:26 UTC 2020
Moritz Angermann pushed to branch wip/angerman/cross-test-suite at Glasgow Haskell Compiler / GHC
Commits:
2f96bd31 by Moritz Angermann at 2020-07-15T12:36:13+00:00
Fix test-wrapper in python, so hadrian gets the benefit.
- - - - -
2 changed files:
- testsuite/driver/testglobals.py
- testsuite/driver/testlib.py
Changes:
=====================================
testsuite/driver/testglobals.py
=====================================
@@ -188,6 +188,10 @@ class TestConfig:
# I have no idea what this does
self.package_conf_cache_file = None # type: Optional[Path]
+ # test-wrapper, a program to run the executable through.
+ # the driver/id program is the identity test-wrapper.
+ self.test_wrapper = None
+
global config
config = TestConfig()
=====================================
testsuite/driver/testlib.py
=====================================
@@ -1649,7 +1649,14 @@ def simple_run(name: TestName, way: WayName, prog: str, extra_run_opts: str) ->
if opts.cmd_wrapper is not None:
cmd = opts.cmd_wrapper(cmd)
- cmd = 'cd "{opts.testdir}" && {cmd}'.format(**locals())
+ # The test wrapper. Default to $TOP / driver / id
+ # for the identity test-wrapper.
+ if config.test_wrapper is None:
+ test_wrapper = config.top / "driver" / "id"
+ else:
+ test_wrapper = config.test_wrapper
+
+ cmd = 'cd "{opts.testdir}" && TEST_WRAPPER="{test_wrapper}" {cmd}'.format(**locals())
# run the command
exit_code = runCmd(cmd, stdin_arg, stdout_arg, stderr_arg, opts.run_timeout_multiplier)
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/2f96bd31a0108aa4fcf26d470f5ceb5fd5662b75
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/2f96bd31a0108aa4fcf26d470f5ceb5fd5662b75
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200715/214fe686/attachment-0001.html>
More information about the ghc-commits
mailing list