summaryrefslogtreecommitdiff
path: root/testsuite/driver
diff options
context:
space:
mode:
authorThomas Miedema <thomasmiedema@gmail.com>2015-06-30 10:57:19 +0200
committerThomas Miedema <thomasmiedema@gmail.com>2015-06-30 12:10:47 +0200
commit6b9fc657ec561e7b96c93d9fe79da5a5e1b013ed (patch)
treed9475892f41e4ec7779325ea35a62431320efe94 /testsuite/driver
parent897a46c16756060d2b924ec0953de140060592c7 (diff)
downloadhaskell-6b9fc657ec561e7b96c93d9fe79da5a5e1b013ed.tar.gz
Testsuite: put extra_run_opts last on command line
Some tests use the format: extra_run_opts('+RTS foo') (without closing -RTS). Make it clear in testlib.py that this should work.
Diffstat (limited to 'testsuite/driver')
-rw-r--r--testsuite/driver/testlib.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 033440bba4..0fcb738756 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -1293,7 +1293,7 @@ def simple_build( name, way, extra_hc_opts, should_fail, top_mod, link, addsuf,
# from /dev/null. Route output to testname.run.stdout and
# testname.run.stderr. Returns the exit code of the run.
-def simple_run( name, way, prog, args ):
+def simple_run(name, way, prog, extra_run_opts):
opts = getTestOpts()
# figure out what to use for stdin
@@ -1319,7 +1319,9 @@ def simple_run( name, way, prog, args ):
stats_file = name + '.stats'
if len(opts.stats_range_fields) > 0:
- args += ' +RTS -V0 -t' + stats_file + ' --machine-readable -RTS'
+ stats_args = ' +RTS -V0 -t' + stats_file + ' --machine-readable -RTS'
+ else:
+ stats_args = ''
if opts.no_stdin:
stdin_comes_from = ''
@@ -1333,8 +1335,10 @@ def simple_run( name, way, prog, args ):
redirection = ' > {0} 2> {1}'.format(run_stdout, run_stderr)
redirection_append = ' >> {0} 2>> {1}'.format(run_stdout, run_stderr)
- cmd = prog + ' ' + args + ' ' \
+ # Put extra_run_opts last: extra_run_opts('+RTS foo') should work.
+ cmd = prog + stats_args + ' ' \
+ my_rts_flags + ' ' \
+ + extra_run_opts + ' ' \
+ stdin_comes_from \
+ redirection