[commit: testsuite] master: Copy the flag lists before altering them (8f3da69)

Ian Lynagh <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/8f3da69fb7e70793143929d92237a857b2a6eb90

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

commit 8f3da69fb7e70793143929d92237a857b2a6eb90
Author: Ian Lynagh <[email protected]>
Date:   Thu Oct 11 12:51:06 2012 +0100

    Copy the flag lists before altering them
    
    They are mutable values, so altering them affects other tests too

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

 driver/testlib.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/driver/testlib.py b/driver/testlib.py
index 74b8b66..58e2534 100644
--- a/driver/testlib.py
+++ b/driver/testlib.py
@@ -1148,7 +1148,7 @@ def simple_build( name, way, extra_hc_opts, should_fail, top_mod, link, addsuf,
     else:
         cmd_prefix = getTestOpts().compile_cmd_prefix + ' '
 
-    comp_flags = getTestOpts().compiler_always_flags
+    comp_flags = copy.copy(getTestOpts().compiler_always_flags)
     if noforce:
         comp_flags = filter(lambda f: f != '-fforce-recomp', comp_flags)
     if getTestOpts().outputdir != None:
@@ -1337,7 +1337,7 @@ def interpreter_run( name, way, extra_hc_opts, compile_only, top_mod ):
 
     script.close()
 
-    flags = getTestOpts().compiler_always_flags
+    flags = copy.copy(getTestOpts().compiler_always_flags)
     if getTestOpts().outputdir != None:
         flags.extend(["-outputdir", getTestOpts().outputdir])
 
@@ -1434,7 +1434,7 @@ def extcore_run( name, way, extra_hc_opts, compile_only, top_mod ):
     else:
         to_do = ' --make ' + top_mod + ' '
 
-    flags = getTestOpts().compiler_always_flags
+    flags = copy.copy(getTestOpts().compiler_always_flags)
     if getTestOpts().outputdir != None:
         flags.extend(["-outputdir", getTestOpts().outputdir])
     cmd = 'cd ' + getTestOpts().testdir + " && '" \
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.