summaryrefslogtreecommitdiff
path: root/testsuite/driver
diff options
context:
space:
mode:
authorJoachim Breitner <mail@joachim-breitner.de>2013-10-05 17:04:31 +0200
committerJoachim Breitner <mail@joachim-breitner.de>2013-10-05 17:07:16 +0200
commit718e86b4751b0435097bdde46855e819cf4f7864 (patch)
treeb1a6fbf85d3596966067004517636250416d9337 /testsuite/driver
parent3db765088ac7c919bdf283cb6263e2ceedf6bc27 (diff)
downloadhaskell-718e86b4751b0435097bdde46855e819cf4f7864.tar.gz
Flag to test suite: SKIP_PERF_TESTS
More often than not the output of the performance tests is in the way, rather than helping. This allows the use of `make SKIP_PERF_TESTS=YES` to skip these tests. Fixes #8413
Diffstat (limited to 'testsuite/driver')
-rw-r--r--testsuite/driver/runtests.py4
-rw-r--r--testsuite/driver/testglobals.py3
-rw-r--r--testsuite/driver/testlib.py6
3 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/driver/runtests.py b/testsuite/driver/runtests.py
index b0367f3073..8ed6499a0a 100644
--- a/testsuite/driver/runtests.py
+++ b/testsuite/driver/runtests.py
@@ -45,6 +45,7 @@ long_options = [
"threads=", # threads to run simultaneously
"check-files-written", # check files aren't written by multiple tests
"verbose=", # verbose (0,1,2 so far)
+ "skip-perf-tests", # skip performance tests
]
opts, args = getopt.getopt(sys.argv[1:], "e:", long_options)
@@ -93,6 +94,9 @@ for opt,arg in opts:
if opt == '--check-files-written':
config.check_files_written = True
+ if opt == '--skip-perf-tests':
+ config.skip_perf_tests = True
+
if opt == '--verbose':
if arg not in ["0","1","2","3"]:
sys.stderr.write("ERROR: requested verbosity %s not supported, use 0,1,2 or 3" % arg)
diff --git a/testsuite/driver/testglobals.py b/testsuite/driver/testglobals.py
index 85a5b7d7d8..203d85f336 100644
--- a/testsuite/driver/testglobals.py
+++ b/testsuite/driver/testglobals.py
@@ -112,6 +112,9 @@ class TestConfig:
# Should we check for files being written more than once?
self.check_files_written = False
+ # Should we skip performance tests
+ self.skip_perf_tests = False
+
global config
config = TestConfig()
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 4694b5e3d1..ed7d02f819 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -60,6 +60,11 @@ def setLocalTestOpts(opts):
global testopts_local
testopts_local.x=opts
+def isStatsTest():
+ opts = getTestOpts()
+ return len(opts.compiler_stats_range_fields) > 0 or len(opts.stats_range_fields) > 0
+
+
# This can be called at the top of a file of tests, to set default test options
# for the following tests.
def setTestOpts( f ):
@@ -606,6 +611,7 @@ def test_common_work (name, opts, func, args):
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())) \
and way not in getTestOpts().omit_ways
# Which ways we are asked to skip