diff options
author | Ben Gamari <ben@smart-cactus.org> | 2018-12-16 10:43:11 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2019-10-08 12:18:48 -0400 |
commit | bbada065433545ec1cd053538413ab4ab06b6e1d (patch) | |
tree | 3c68d9422a1230955520763f1994fdac1326162c /testsuite/driver/testlib.py | |
parent | d0924b153b093a925c9e721f2540f3dfd6c278ae (diff) | |
download | haskell-wip/T16042.tar.gz |
testsuite: Ensure that makefile tests get runwip/T16042
Previously `makefile_test` and `run_command` tests could easily end up
in a situation where they wouldn't be run if the user used the
`only_ways` modifier. The reason is to build the set of a ways to run
the test in we first start with a candidate set determined by the test
type (e.g. `makefile_test`, `compile_run`, etc.) and then filter that
set with the constraints given by the test's modifiers.
`makefile_test` and `run_command` tests' candidate sets were simply
`{normal}`, and consequently most uses of `only_ways` would result in
the test being never run.
To avoid this we rather use all ways as the candidate sets for these
test types. This may result in a few more testcases than we would like
(given that some `run_command` tests are insensitive to way) but this
can be fixed by adding modifiers and we would much rather run too many
tests than too few.
This fixes #16042 and a number of other tests afflicted by the same issue.
However, there were a few cases that required special attention:
* `T14028` is currently failing and is therefore marked as broken due
to #17300
* `T-signals-child` is fragile in the `threaded1` and `threaded2` ways
(tracked in #17307)
Diffstat (limited to 'testsuite/driver/testlib.py')
-rw-r--r-- | testsuite/driver/testlib.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index 36aaf38076..7fe0630094 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -829,6 +829,11 @@ def test_common_work(watcher: testutil.Watcher, all_ways = [WayName('ghci')] else: all_ways = [] + elif func in [makefile_test, run_command]: + # makefile tests aren't necessarily runtime or compile-time + # specific. Assume we can run them in all ways. See #16042 for what + # happened previously. + all_ways = config.compile_ways + config.run_ways else: all_ways = [WayName('normal')] |