diff --git a/testing/android_cppunittest_manifest.txt b/testing/android_cppunittest_manifest.txt new file mode 100644 index 00000000000..968ff772cd1 --- /dev/null +++ b/testing/android_cppunittest_manifest.txt @@ -0,0 +1,5 @@ +# This is just a list of tests to skip, one test per line +TestTXMgr # Bug 919595 +TestPlainTextSerializer # Bug 919599 +TestNativeXMLHttpRequest # Bug 919642 +mediapipeline_unittest # Bug 919646 diff --git a/testing/remotecppunittests.py b/testing/remotecppunittests.py index b16388476c8..e0366caddf6 100644 --- a/testing/remotecppunittests.py +++ b/testing/remotecppunittests.py @@ -227,7 +227,7 @@ def main(): print "Error: you must provide a device IP to connect to via the --deviceIP option" sys.exit(1) options.xre_path = os.path.abspath(options.xre_path) - progs = cppunittests.extract_unittests_from_args(args) + progs = cppunittests.extract_unittests_from_args(args, options.manifest_file) tester = RemoteCPPUnitTests(dm, options, progs) try: result = tester.run_tests(progs, options.xre_path, options.symbols_path) diff --git a/testing/runcppunittests.py b/testing/runcppunittests.py index 3e8cd9b672d..7c575e4c649 100644 --- a/testing/runcppunittests.py +++ b/testing/runcppunittests.py @@ -137,19 +137,33 @@ class CPPUnittestOptions(OptionParser): action = "store", type = "string", dest = "symbols_path", default = None, help = "absolute path to directory containing breakpad symbols, or the URL of a zip file containing symbols") + self.add_option("--skip-manifest", + action = "store", type = "string", dest = "manifest_file", + default = None, + help = "absolute path to a manifest file") -def extract_unittests_from_args(args): +def extract_unittests_from_args(args, manifest_file): """Extract unittests from args, expanding directories as needed""" progs = [] + skipped_progs = set() + + if manifest_file: + skipped_progs.add(os.path.basename(manifest_file)) + with open(manifest_file) as f: + for line in f: + # strip out comment, if any + prog = line.split('#')[0] + if prog: + skipped_progs.add(prog.strip()) for p in args: if os.path.isdir(p): - #filter out .py files packaged with the unit tests - progs.extend([os.path.abspath(os.path.join(p, x)) for x in os.listdir(p) if not x.endswith('.py')]) - else: + progs.extend([os.path.abspath(os.path.join(p, x)) for x in os.listdir(p) if not x in skipped_progs]) + elif p not in skipped_progs: progs.append(os.path.abspath(p)) - return progs + #filter out python files packaged with the unit tests + return filter(lambda x: not x.endswith('.py') and not x.endswith('.pyc'), progs) def main(): parser = CPPUnittestOptions() @@ -160,7 +174,8 @@ def main(): if not options.xre_path: print >>sys.stderr, """Error: --xre-path is required""" sys.exit(1) - progs = extract_unittests_from_args(args) + + progs = extract_unittests_from_args(args, options.manifest_file) options.xre_path = os.path.abspath(options.xre_path) tester = CPPUnitTests() try: diff --git a/testing/testsuite-targets.mk b/testing/testsuite-targets.mk index 7a8642aaddd..c59d865f237 100644 --- a/testing/testsuite-targets.mk +++ b/testing/testsuite-targets.mk @@ -504,6 +504,7 @@ else endif $(NSINSTALL) $(topsrcdir)/testing/runcppunittests.py $(PKG_STAGE)/cppunittests $(NSINSTALL) $(topsrcdir)/testing/remotecppunittests.py $(PKG_STAGE)/cppunittests + $(NSINSTALL) $(topsrcdir)/testing/android_cppunittest_manifest.txt $(PKG_STAGE)/cppunittests stage-jittest: $(NSINSTALL) -D $(PKG_STAGE)/jit-test/tests