Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Unified Diff: tools/isolate/run_test_cases_test.py

Issue 10829014: Add --gtest_filter support to run_test_cases.py. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/isolate/run_test_cases.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/isolate/run_test_cases_test.py
diff --git a/tools/isolate/run_test_cases_test.py b/tools/isolate/run_test_cases_test.py
index 8f06a6c65e4652926c009d686d7d93e5fc655b2b..b0b56368dac3067645d97742fdd548d83187688c 100755
--- a/tools/isolate/run_test_cases_test.py
+++ b/tools/isolate/run_test_cases_test.py
@@ -96,6 +96,23 @@ class RunTestCases(unittest.TestCase):
self.assertEquals('Sleeping.\nSlept.\n', output)
self.assertEquals(0, code)
+ def test_gtest_filter(self):
+ old = run_test_cases.run_test_cases
+ exe = os.path.join(ROOT_DIR, 'data', 'gtest_fake', 'gtest_fake_pass.py')
+ def expect(executable, test_cases, jobs, timeout, no_dump):
+ self.assertEquals(exe, executable)
+ self.assertEquals(['Foo.Bar1', 'Foo.Bar3'], test_cases)
+ self.assertEquals(run_test_cases.num_processors(), jobs)
+ self.assertEquals(120, timeout)
+ self.assertEquals(None, no_dump)
+ return 89
+ try:
+ run_test_cases.run_test_cases = expect
+ result = run_test_cases.main([exe, '--gtest_filter=Foo.Bar*-*.Bar2'])
+ self.assertEquals(89, result)
+ finally:
+ run_test_cases.run_test_cases = old
+
class WorkerPoolTest(unittest.TestCase):
def test_normal(self):
« no previous file with comments | « tools/isolate/run_test_cases.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698