diff options
author | Thomas Miedema <thomasmiedema@gmail.com> | 2015-08-15 21:10:32 +0200 |
---|---|---|
committer | Thomas Miedema <thomasmiedema@gmail.com> | 2015-08-15 21:14:34 +0200 |
commit | 744ff88537fa26bd4826ea35679fce04c65eee97 (patch) | |
tree | 1bf92a7ae5b485719f97944addb2c068ec5818e4 | |
parent | ca8544206ab723e21f55452f77aa1c5709074fe5 (diff) | |
download | haskell-744ff88537fa26bd4826ea35679fce04c65eee97.tar.gz |
Testsuite: speedup running a single test
Benchmark: in rootdirectory, run `time make test TEST=dummy VERBOSE=0`
Before this commit: 2.6s
After this commit: 0.7s
-rw-r--r-- | testsuite/driver/testlib.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index 4e419f46c0..3311f00775 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -591,6 +591,9 @@ def runTest (opts, name, func, args): # name :: String # setup :: TestOpts -> IO () def test (name, setup, func, args): + if config.only and name not in config.only: + return + global aloneTests global parallelTests global allTestNames @@ -663,7 +666,6 @@ def test_common_work (name, opts, func, args): ok_way = lambda way: \ not getTestOpts().skip \ - and (config.only == [] or name in config.only) \ and (getTestOpts().only_ways == None or way in getTestOpts().only_ways) \ and (config.cmdline_ways == [] or way in config.cmdline_ways) \ and (not (config.skip_perf_tests and isStatsTest())) \ |