[commit: ghc] master: Make testsuite driver Python 2.6 compatible again (0f03a84)

git at git.haskell.org git at git.haskell.org
Mon Mar 23 12:57:25 UTC 2015


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/0f03a843e7e740218f3ce3853f80de99b0ed6236/ghc

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

commit 0f03a843e7e740218f3ce3853f80de99b0ed6236
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date:   Mon Mar 23 13:56:22 2015 +0100

    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


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

0f03a843e7e740218f3ce3853f80de99b0ed6236
 testsuite/driver/testlib.py | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 961f545..d3b9b20 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}'



More information about the ghc-commits mailing list