[commit: ghc] wip/T16212-fixed, wip/sgraf-no-exnstr: testsuite: Introduce makefile_test (bdb559a)

git at git.haskell.org git at git.haskell.org
Fri Feb 1 05:54:46 UTC 2019


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

On branches: wip/T16212-fixed,wip/sgraf-no-exnstr
Link       : http://ghc.haskell.org/trac/ghc/changeset/bdb559a60a18318b6130f399f158739118237f9b/ghc

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

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

    testsuite: Introduce makefile_test


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

bdb559a60a18318b6130f399f158739118237f9b
 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 4a87f0a..d29024d 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -1002,6 +1002,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