aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJukka Jylänki <jujjyl@gmail.com>2013-05-09 17:57:27 +0300
committerJukka Jylänki <jujjyl@gmail.com>2013-05-09 18:01:19 +0300
commitf3dc904275d41e6853fa68815e9ead227cc64686 (patch)
treef4009e814e8ae1b1b4c88144db8bdc200d4a4be2
parent5e86eb0a834d9da5128e9fe9a6e24f94ec1cf0c1 (diff)
Add support for skipping all modes of a single test with 'python tests/runner.py skip:ALL.test_freetype', instead of having to specify all the modes for the test to be skipped by hand.
-rwxr-xr-xtests/runner.py19
1 files changed, 15 insertions, 4 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 27fb84dc..8e3b3e0d 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -447,6 +447,8 @@ process(sys.argv[1])
sys.argv = map(lambda arg: arg if not arg.startswith('test_') else 'default.' + arg, sys.argv)
+test_modes = ['default', 'o1', 'o2', 'asm1', 'asm2', 'asm2g', 'asm2x86', 's_0_0', 's_0_1', 's_1_0', 's_1_1']
+
test_index = 0
if 'benchmark' not in str(sys.argv) and 'sanity' not in str(sys.argv) and 'browser' not in str(sys.argv):
@@ -454,10 +456,10 @@ if 'benchmark' not in str(sys.argv) and 'sanity' not in str(sys.argv) and 'brows
print "Running Emscripten tests..."
- if len(sys.argv) == 2 and 'ALL.' in sys.argv[1]:
+ if len(sys.argv) == 2 and sys.argv[1].startswith('ALL.'):
ignore, test = sys.argv[1].split('.')
print 'Running all test modes on test "%s"' % test
- sys.argv = [sys.argv[0], 'default.'+test, 'o1.'+test, 'o2.'+test, 'asm1.'+test, 'asm2.'+test, 'asm2g.'+test, 'asm2x86.'+test, 's_0_0.'+test, 's_0_1.'+test, 's_1_0.'+test, 's_1_1.'+test]
+ sys.argv = [sys.argv[0]] + map(lambda mode: mode+'.'+test, test_modes)
class T(RunnerCore): # Short name, to make it more fun to use manually on the commandline
## Does a complete test - builds, runs, checks output, etc.
@@ -13423,8 +13425,17 @@ if __name__ == '__main__':
arg = sys.argv[i]
if arg.startswith('skip:'):
which = arg.split('skip:')[1]
- print >> sys.stderr, 'will skip "%s"' % which
- exec(which + ' = RunnerCore.skipme')
+ if which.startswith('ALL.'):
+ ignore, test = which.split('.')
+ which = map(lambda mode: mode+'.'+test, test_modes)
+ else:
+ which = [which]
+
+ print >> sys.stderr, ','.join(which)
+ for test in which:
+ print >> sys.stderr, 'will skip "%s"' % test
+ exec(test + ' = RunnerCore.skipme')
+
sys.argv[i] = ''
sys.argv = filter(lambda arg: arg, sys.argv)