diff options
author | Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro> | 2012-01-28 13:42:34 +0200 |
---|---|---|
committer | Pekka Enberg <penberg@kernel.org> | 2012-01-28 22:19:45 +0200 |
commit | 1cf0e537d09d5b50a1d94c026871c234bcc982d3 (patch) | |
tree | a228e6f8eafcb24bc9c1d3f8d38ecce840ea9861 | |
parent | ed365549dc57bcab3ce3dc2f9ffcd11d5acf1bd4 (diff) | |
download | jato-1cf0e537d09d5b50a1d94c026871c234bcc982d3.tar.gz |
tools/test.py: add option for checking skipped tests
It's useful to check whether additional tests pass following some
changes. This adds the option '-s' to tools/test.py which runs only the
unsupported tests and reports the ones which are passed, instead of
failures.
Signed-off-by: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
-rwxr-xr-x | tools/test.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tools/test.py b/tools/test.py index 05400ef0..1bed4aa7 100755 --- a/tools/test.py +++ b/tools/test.py @@ -5,6 +5,7 @@ from Queue import Queue import multiprocessing import subprocess import platform +import argparse import time import sys import os @@ -145,9 +146,14 @@ def progress(index, total, t): sys.stdout.flush() def main(): + optparser = argparse.ArgumentParser("Run Jato functional tests.") + optparser.add_argument("-s", dest="skipped", action="store_true", + help="check which skipped tests actually pass") + opts = optparser.parse_args() + results = Queue() - tests = filter(is_test_supported, TESTS) + tests = filter(lambda t: is_test_supported(t) != opts.skipped, TESTS) def do_work(t): klass, expected_retval, extra_args, archs = t @@ -156,9 +162,12 @@ def main(): command = ["./jato", "-cp", TEST_DIR ] + extra_args + [ klass ] retval = subprocess.call(command, stderr = fnull) if retval != expected_retval: - print klass + ": Test FAILED" + if not opts.skipped: + print klass + ": Test FAILED" results.put(False) else: + if opts.skipped: + print klass + ": Test SUCCEEDED" results.put(True) def worker(): |