[Git][ghc/ghc][wip/angerman/cross-test-suite] :fire:

Moritz Angermann gitlab at gitlab.haskell.org
Fri Jul 17 06:09:41 UTC 2020



Moritz Angermann pushed to branch wip/angerman/cross-test-suite at Glasgow Haskell Compiler / GHC


Commits:
a7a75a37 by Moritz Angermann at 2020-07-17T06:09:28+00:00
:fire:

- - - - -


1 changed file:

- testsuite/driver/testlib.py


Changes:

=====================================
testsuite/driver/testlib.py
=====================================
@@ -1652,8 +1652,8 @@ def simple_run(name: TestName, way: WayName, prog: str, extra_run_opts: str) ->
 
     if opts.cmd_prefix is not None:
         cmd = opts.cmd_prefix(cmd)
-    elif not cmd.startswith("$MAKE"):
-        # (optional) 3. prefix with TEST_WRAPPER, unless it's a $MAKE call.
+    else:
+        # (optional) 3. Add TEST_WRAPPER environment variable.
         #
         # The test wrapper. Default to $TOP / driver / id
         # for the identity test-wrapper.
@@ -1665,7 +1665,15 @@ def simple_run(name: TestName, way: WayName, prog: str, extra_run_opts: str) ->
         else:
             test_wrapper = config.test_wrapper
 
-        cmd = 'TEST_WRAPPER="{test_wrapper}" && $TEST_WRAPPER {cmd}'.format(**locals())
+        # if cmd looks like we want to execute something, run it through
+        # the command wrapper.
+        if cmd.startswith("./"):
+            # we don't need to prefix cmd with anything if there is no
+            # test wrapper.
+            if config.test_wrapper is not None:
+                cmd = "{test_wrapper} {cmd}".format(**locals())
+        else:
+            cmd = 'TEST_WRAPPER="{test_wrapper}" && {cmd}'.format(**locals())
 
     # 4. Apply cmd_wrapper if set.
     if opts.cmd_wrapper is not None:



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a7a75a370c3496197aeea7ff926fa2a765791765

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a7a75a370c3496197aeea7ff926fa2a765791765
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/20200717/b178d7d1/attachment-0001.html>


More information about the ghc-commits mailing list