[commit: ghc] wip/makefile-test: testsuite: Introduce makefile_test (6ef670b)

git at git.haskell.org git at git.haskell.org
Mon Jan 21 03:56:04 UTC 2019


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/makefile-test
Link       : http://ghc.haskell.org/trac/ghc/changeset/6ef670b99f96b2eadabaca39f595b2e88b1eb58e/ghc

>---------------------------------------------------------------

commit 6ef670b99f96b2eadabaca39f595b2e88b1eb58e
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Sun Jan 20 22:54:48 2019 -0500

    testsuite: Introduce makefile_test


>---------------------------------------------------------------

6ef670b99f96b2eadabaca39f595b2e88b1eb58e
 testsuite/driver/testlib.py   | 7 +++++++
 testsuite/tests/plugins/all.T | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index d1ab41d..b09e452 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -1001,6 +1001,13 @@ def badResult(result):
 def run_command( name, way, cmd ):
     return simple_run( name, '', override_options(cmd), '' )
 
+def makefile_test( name, way, target=None ):
+    if target is None:
+        target = name
+
+    cmd = '$MAKE -s --no-print-directory {target}'.format(target=target)
+    return run_command(name, way, cmd)
+
 # -----------------------------------------------------------------------------
 # GHCi tests
 
diff --git a/testsuite/tests/plugins/all.T b/testsuite/tests/plugins/all.T
index 30b8fd6..7a5be65 100644
--- a/testsuite/tests/plugins/all.T
+++ b/testsuite/tests/plugins/all.T
@@ -214,4 +214,4 @@ test('T16104',
      [extra_files(['T16104-plugin/']),
       pre_cmd('$MAKE -s --no-print-directory -C T16104-plugin package.T16104-plugin TOP={top}')
      ],
-     run_command, ['$MAKE -s --no-print-directory T16104'])
+     makefile_test, [])



More information about the ghc-commits mailing list