Commit 4b87abf8 authored by Simon Marlow's avatar Simon Marlow
Browse files

clean up the extra_ways machinery

parent 0dc8518a
......@@ -59,8 +59,10 @@ for opt,arg in opts:
sys.stderr.write("ERROR: requested way \'" +
arg + "\' does not exist\n")
sys.exit(1)
config.run_ways = filter(eq(arg), config.run_ways + config.other_ways)
config.compile_ways = filter(eq(arg), config.compile_ways + config.other_ways)
config.cmdline_ways = [arg] + config.cmdline_ways
if (arg in config.other_ways):
config.run_ways = [arg] + config.run_ways
config.compile_ways = [arg] + config.compile_ways
if opt == '--skipway':
if (arg not in config.run_ways and arg not in config.compile_ways and arg not in config.other_ways):
......
......@@ -66,6 +66,10 @@ class TestConfig:
# libraries.
self.compile_ways = []
self.run_ways = []
self.other_ways = []
# The ways selected via the command line.
self.cmdline_ways = []
# Lists of flags for each way
self.way_flags = {}
......
......@@ -345,7 +345,9 @@ def test_common_work (name, opts, func, args):
else:
all_ways = ['normal']
all_ways = all_ways + opts.extra_ways
# A test itself can request extra ways by setting opts.extra_ways
all_ways = all_ways + filter(lambda way: way not in all_ways,
opts.extra_ways)
t.total_test_cases = t.total_test_cases + len(all_ways)
......@@ -353,6 +355,7 @@ def test_common_work (name, opts, func, args):
not getTestOpts().skip \
and (config.only == [] or name in config.only) \
and (getTestOpts().only_ways == [] or way in getTestOpts().only_ways) \
and (config.cmdline_ways == [] or way in config.cmdline_ways) \
and way not in getTestOpts().omit_ways
# Which ways we are asked to skip
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment