diff options
author | Edward Z. Yang <ezyang@cs.stanford.edu> | 2015-09-20 12:16:50 +0200 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2015-09-20 12:16:51 +0200 |
commit | b89c49138fcd62a1175d67fac62d59ac2497bfdd (patch) | |
tree | d5b175c746ab564948ff555352087f2eec6481bd | |
parent | 8ee2b9532e3249c652f3bdabaf4ee9e3e3a282b9 (diff) | |
download | haskell-b89c49138fcd62a1175d67fac62d59ac2497bfdd.tar.gz |
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@cs.stanford.edu>
Test Plan: validate
Reviewers: austin, thomie, bgamari
Reviewed By: austin, thomie, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1251
-rw-r--r-- | Makefile | 7 | ||||
-rw-r--r-- | testsuite/driver/testlib.py | 9 | ||||
-rw-r--r-- | testsuite/tests/codeGen/should_run/all.T | 2 |
3 files changed, 14 insertions, 4 deletions
@@ -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, ['']) |