summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile7
-rw-r--r--testsuite/driver/testlib.py9
-rw-r--r--testsuite/tests/codeGen/should_run/all.T2
3 files changed, 14 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 38c7eb9be4..348375f9c2 100644
--- a/Makefile
+++ b/Makefile
@@ -191,12 +191,15 @@ endif
# cd tests config. many many by
# validate && make speed= tests ways whom
# =============================================================================
-# --fast fast 2 some 1 Travis (to stay within time limit)
-# --normal test 1 all 1 Phabricator (slow takes too long?)
+# --fast fast 2 some 1+exs Travis (to stay within time limit)
+# --normal test 1 all 1+exs Phabricator (slow takes too long?)
# --slow slow 0 all all Nightly (slow is ok)
#
# accept 1 all 1
#
+# `--fast` and `--normal` run one default way, as well as any other ways which
+# are explicitly requested by the test using extra_ways().
+#
# `make accept` should run all tests exactly once. There is no point in
# accepting a test for multiple ways, since it should produce the same output
# for all ways.
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 170039222d..34a3fb8754 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -676,8 +676,15 @@ def test_common_work (name, opts, func, args):
# Only run all ways in slow mode.
# See Note [validate and testsuite speed] in toplevel Makefile.
- if config.speed > 0:
+ if config.accept:
+ # Only ever run one way
do_ways = do_ways[:1]
+ elif config.speed > 0:
+ # However, if we EXPLICITLY asked for a way (with extra_ways)
+ # please test it!
+ explicit_ways = filter(lambda way: way in opts.extra_ways, do_ways)
+ other_ways = filter(lambda way: way not in opts.extra_ways, do_ways)
+ do_ways = other_ways[:1] + explicit_ways
if not config.clean_only:
# Run the required tests...
diff --git a/testsuite/tests/codeGen/should_run/all.T b/testsuite/tests/codeGen/should_run/all.T
index f9e0e0e7e2..ab2ce60cca 100644
--- a/testsuite/tests/codeGen/should_run/all.T
+++ b/testsuite/tests/codeGen/should_run/all.T
@@ -1,5 +1,5 @@
# Test +RTS -G1 here (it isn't tested anywhere else)
-setTestOpts(extra_ways(['g1']))
+setTestOpts(unless(fast(), extra_ways(['g1'])))
test('cgrun001', normal, compile_and_run, [''])
test('cgrun002', normal, compile_and_run, [''])