[commit: ghc] master: Testsuite: speedup running a single test (744ff88)

git at git.haskell.org git at git.haskell.org
Mon Aug 17 14:21:31 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/744ff88537fa26bd4826ea35679fce04c65eee97/ghc

>---------------------------------------------------------------

commit 744ff88537fa26bd4826ea35679fce04c65eee97
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date:   Sat Aug 15 21:10:32 2015 +0200

    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


>---------------------------------------------------------------

744ff88537fa26bd4826ea35679fce04c65eee97
 testsuite/driver/testlib.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 4e419f4..3311f00 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())) \



More information about the ghc-commits mailing list