Commit b89c4913 authored by Edward Z. Yang's avatar Edward Z. Yang Committed by Ben Gamari

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: default avatarEdward 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
parent 8ee2b953
......@@ -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.
......
......@@ -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...
......
# 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, [''])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment