summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Miedema <thomasmiedema@gmail.com>2015-03-23 13:56:22 +0100
committerThomas Miedema <thomasmiedema@gmail.com>2015-03-23 13:56:26 +0100
commit0f03a843e7e740218f3ce3853f80de99b0ed6236 (patch)
tree95d87147c87f5f612b4329f03a70a33c62d01385
parent1a7288696afec8ea3dbb39a3c2df3cc42bf379bd (diff)
downloadhaskell-0f03a843e7e740218f3ce3853f80de99b0ed6236.tar.gz
Make testsuite driver Python 2.6 compatible again
Another bug in the #10164 series. Only Python 2.7 and up allow you to omit the positional argument specifiers in format strings. Test Plan: this fixes the Solaris builders Reviewed By: kgardas Differential Revision: https://phabricator.haskell.org/D750 GHC Trac Issues: #10164
-rw-r--r--testsuite/driver/testlib.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 961f54565f..d3b9b204f9 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -1306,11 +1306,11 @@ def simple_run( name, way, prog, args ):
stdin_comes_from = ' <' + use_stdin
if opts.combined_output:
- redirection = ' > {} 2>&1'.format(run_stdout)
- redirection_append = ' >> {} 2>&1'.format(run_stdout)
+ redirection = ' > {0} 2>&1'.format(run_stdout)
+ redirection_append = ' >> {0} 2>&1'.format(run_stdout)
else:
- redirection = ' > {} 2> {}'.format(run_stdout, run_stderr)
- redirection_append = ' >> {} 2>> {}'.format(run_stdout, run_stderr)
+ redirection = ' > {0} 2> {1}'.format(run_stdout, run_stderr)
+ redirection_append = ' >> {0} 2>> {1}'.format(run_stdout, run_stderr)
cmd = prog + ' ' + args + ' ' \
+ my_rts_flags + ' ' \
@@ -1418,11 +1418,11 @@ def interpreter_run( name, way, extra_hc_opts, compile_only, top_mod ):
config.way_flags(name)[way])
if getTestOpts().combined_output:
- redirection = ' > {} 2>&1'.format(outname)
- redirection_append = ' >> {} 2>&1'.format(outname)
+ redirection = ' > {0} 2>&1'.format(outname)
+ redirection_append = ' >> {0} 2>&1'.format(outname)
else:
- redirection = ' > {} 2> {}'.format(outname, errname)
- redirection_append = ' >> {} 2>> {}'.format(outname, errname)
+ redirection = ' > {0} 2> {1}'.format(outname, errname)
+ redirection_append = ' >> {0} 2>> {1}'.format(outname, errname)
cmd = ('{{compiler}} {srcname} {flags} {extra_hc_opts} '
'< {scriptname} {redirection}'