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

Unified Diff: test/cctest/testcfg.py

Issue 19541: Fixing the flakiness of the serialization tests by assuring that serializatio... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 11 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 | « test/cctest/test-serialize.cc ('k') | tools/test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/testcfg.py
===================================================================
--- test/cctest/testcfg.py (revision 1212)
+++ test/cctest/testcfg.py (working copy)
@@ -36,27 +36,37 @@
class CcTestCase(test.TestCase):
- def __init__(self, path, executable, mode, raw_name, context):
+ def __init__(self, path, executable, mode, raw_name, dependency, context):
super(CcTestCase, self).__init__(context, path)
self.executable = executable
self.mode = mode
self.raw_name = raw_name
+ self.dependency = dependency
def GetLabel(self):
return "%s %s %s" % (self.mode, self.path[-2], self.path[-1])
def GetName(self):
return self.path[-1]
-
- def GetCommand(self):
+
+ def BuildCommand(self, name):
serialization_file = join('obj', 'test', self.mode, 'serdes')
serialization_option = '--testing_serialization_file=' + serialization_file
- result = [ self.executable, self.raw_name, serialization_option ]
+ result = [ self.executable, name, serialization_option ]
if self.mode == 'debug':
result += DEBUG_FLAGS
return result
+ def GetCommand(self):
+ return self.BuildCommand(self.raw_name)
+
+ def Run(self):
+ if self.dependency != '':
+ dependent_command = self.BuildCommand(self.dependency)
+ self.RunCommand(dependent_command)
Christian Plesner Hansen 2009/02/03 08:21:16 Consider checking that this command didn't fail an
olehougaard 2009/02/03 08:34:26 Done
+ return test.TestCase.Run(self)
+
class CcTestConfiguration(test.TestConfiguration):
def __init__(self, context, root):
@@ -75,10 +85,14 @@
print output.stderr
return []
result = []
- for raw_test in output.stdout.strip().split():
- full_path = current_path + raw_test.split('/')
+ for test_desc in output.stdout.strip().split():
+ raw_test, dependency = test_desc.split('<')
+ relative_path = raw_test.split('/')
+ full_path = current_path + relative_path
+ if dependency != '':
+ dependency = relative_path[0] + '/' + dependency
if self.Contains(path, full_path):
- result.append(CcTestCase(full_path, executable, mode, raw_test, self.context))
+ result.append(CcTestCase(full_path, executable, mode, raw_test, dependency, self.context))
return result
def GetTestStatus(self, sections, defs):
« no previous file with comments | « test/cctest/test-serialize.cc ('k') | tools/test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698