Skip to content

Commit

Permalink
Testsuite: speedup running a single test
Browse files Browse the repository at this point in the history
Benchmark: in rootdirectory, run `time make test TEST=dummy VERBOSE=0`
Before this commit: 2.6s
After this commit: 0.7s
  • Loading branch information
thomie committed Aug 15, 2015
1 parent ca85442 commit 744ff88
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion testsuite/driver/testlib.py
Expand Up @@ -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
Expand Down Expand Up @@ -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())) \
Expand Down

0 comments on commit 744ff88

Please sign in to comment.