Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/5f29222e6043a210dc8b170ae0aa9ed036b2e30a

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

commit 5f29222e6043a210dc8b170ae0aa9ed036b2e30a
Author: Simon Marlow <[email protected]>
Date:   Wed Nov 16 10:22:25 2011 +0000

    Fix meaning of the only_ways field (fixed cgrun057(normal) in validate)
    
    The default setting for only_ways was [], which meant "all ways".
    However, it's really useful to have [] mean "no ways".
    
    In cgrun057 I used only_ways(prof_ways) to mean "only run this in the
    profiling ways", but if profiling is disabled then prof_ways = [] and
    this doesn't do what we want.  Profiling is normally disabled in
    validate, but I had it enabled because I was testing profiling.
    
    So now only_ways defaults to None, which means "all ways", and [] now
    means "no ways".

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

 driver/testglobals.py |    8 ++++----
 driver/testlib.py     |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/driver/testglobals.py b/driver/testglobals.py
index 7a034dc..3da3774 100644
--- a/driver/testglobals.py
+++ b/driver/testglobals.py
@@ -142,16 +142,16 @@ class TestOptions:
 
        # if not None then we look for namebase.stderr etc rather than
        # using the test name
-       self.with_namebase = None;
+       self.with_namebase = None
 
        # skip this test?
-       self.skip = 0;
+       self.skip = 0
 
        # skip these ways
        self.omit_ways = []
 
-       # skip all ways except these ([] == do all ways)
-       self.only_ways = []
+       # skip all ways except these (None == do all ways)
+       self.only_ways = None
 
        # add these ways to the default set
        self.extra_ways = []
diff --git a/driver/testlib.py b/driver/testlib.py
index 7a9b08c..1652b86 100644
--- a/driver/testlib.py
+++ b/driver/testlib.py
@@ -576,7 +576,7 @@ def test_common_work (name, opts, func, args):
         ok_way = lambda way: \
             not getTestOpts().skip \
             and (config.only == [] or name in config.only) \
-            and (getTestOpts().only_ways == [] or way in 
getTestOpts().only_ways) \
+            and (getTestOpts().only_ways == None or way in 
getTestOpts().only_ways) \
             and (config.cmdline_ways == [] or way in config.cmdline_ways) \
             and way not in getTestOpts().omit_ways
 



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to