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

Unified Diff: tools/testing/test_configuration.py

Issue 8258016: Fix running of tests on Chromium and Dartium (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 2 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/testing/test_case.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/test_configuration.py
diff --git a/tools/testing/test_configuration.py b/tools/testing/test_configuration.py
index f41b4832ead455ec0d4202dfcc61b30c4c2c722b..0daa16165101218f1218bae6b9a52e820d205935 100644
--- a/tools/testing/test_configuration.py
+++ b/tools/testing/test_configuration.py
@@ -56,6 +56,13 @@ class StandardTestConfiguration(test.TestConfiguration):
def CreateTestCases(self, test_path, path, filename, mode, arch):
"""Given a .dart filename, create a StandardTestCase from it."""
+ # Look for VM specified as comments in the source file. If
+ # several sets of VM options are specified create a separate
+ # test for each set.
+ source = file(filename).read()
+ vm_options_list = utils.ParseTestOptionsMultiple(VM_OPTIONS_PATTERN,
+ source,
+ test_path)
tags = {}
if filename.endswith('.dart'):
tags = self.SplitMultiTest(test_path, filename)
@@ -63,8 +70,15 @@ class StandardTestConfiguration(test.TestConfiguration):
if tags:
return []
else:
- return [test_case.BrowserTestCase(
- self.context, test_path, filename, False, mode, arch)]
+ if vm_options_list:
+ tests = []
+ for options in vm_options_list:
+ tests.append(test_case.BrowserTestCase(
+ self.context, test_path, filename, False, mode, arch, options))
+ return tests
+ else:
+ return [test_case.BrowserTestCase(
+ self.context, test_path, filename, False, mode, arch)]
else:
tests = []
if tags:
@@ -78,13 +92,6 @@ class StandardTestConfiguration(test.TestConfiguration):
kind,
mode, arch))
else:
- # Look for VM specified as comments in the source file. If
- # several sets of VM options are specified create a separate
- # test for each set.
- source = file(filename).read()
- vm_options_list = utils.ParseTestOptionsMultiple(VM_OPTIONS_PATTERN,
- source,
- test_path)
if vm_options_list:
for options in vm_options_list:
tests.append(test_case.StandardTestCase(self.context,
« no previous file with comments | « tools/testing/test_case.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698