[commit: ghc] master: Always run explicitly requested ways (extra_ways) for fast runs. (b89c491)
git at git.haskell.org
git at git.haskell.org
Sun Sep 20 10:41:59 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/b89c49138fcd62a1175d67fac62d59ac2497bfdd/ghc
>---------------------------------------------------------------
commit b89c49138fcd62a1175d67fac62d59ac2497bfdd
Author: Edward Z. Yang <ezyang at cs.stanford.edu>
Date: Sun Sep 20 12:16:50 2015 +0200
Always run explicitly requested ways (extra_ways) for fast runs.
To keep validates fast, we only one run one way. But I think that
it's important for some tests to run them a few ways, just to
make sure functionality, e.g. the profiler, is working. This commit
changes the logic so that any way specified in extra_ways is always
run for fast. The big changes is now profiling tests are run on
validate.
I also made it so the G1 garbage collector tests only run on slow.
Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu>
Test Plan: validate
Reviewers: austin, thomie, bgamari
Reviewed By: austin, thomie, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1251
>---------------------------------------------------------------
b89c49138fcd62a1175d67fac62d59ac2497bfdd
Makefile | 7 +++++--
testsuite/driver/testlib.py | 9 ++++++++-
testsuite/tests/codeGen/should_run/all.T | 2 +-
3 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index 38c7eb9..348375f 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 1700392..34a3fb8 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 f9e0e0e..ab2ce60 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, [''])
More information about the ghc-commits
mailing list