summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-01-20 22:54:48 -0500
committerBen Gamari <ben@smart-cactus.org>2019-01-30 10:06:31 -0500
commitbdb559a60a18318b6130f399f158739118237f9b (patch)
treeaafe513748a41ef8d174cb88d211635fd8aecae0 /testsuite
parent172a59335fa6c76b17fb6795e87fbc7fcfd198e6 (diff)
downloadhaskell-bdb559a60a18318b6130f399f158739118237f9b.tar.gz
testsuite: Introduce makefile_test
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/driver/testlib.py7
-rw-r--r--testsuite/tests/plugins/all.T2
2 files changed, 8 insertions, 1 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 4a87f0a117..d29024ddc0 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 30b8fd6b2b..7a5be6593c 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, [])