Revision: 7285
Author: [email protected]
Date: Mon Mar 21 05:57:25 2011
Log: Change cctests to use variant flags as part of the name for the
serilization file.
Because we run all tests three times with different variant flags (to
test crankshaft) we might end up in a situation where we try to write
to the same serilization file from two different threads
simultaneously. The patch concats the variant flags at the end of the
serialization file name.
Review URL: http://codereview.chromium.org/6688068
http://code.google.com/p/v8/source/detail?r=7285
Modified:
/branches/bleeding_edge/test/benchmarks/testcfg.py
/branches/bleeding_edge/test/cctest/cctest.status
/branches/bleeding_edge/test/cctest/testcfg.py
/branches/bleeding_edge/test/es5conform/testcfg.py
/branches/bleeding_edge/test/message/testcfg.py
/branches/bleeding_edge/test/mjsunit/testcfg.py
/branches/bleeding_edge/test/mozilla/testcfg.py
/branches/bleeding_edge/test/sputnik/testcfg.py
/branches/bleeding_edge/tools/test.py
=======================================
--- /branches/bleeding_edge/test/benchmarks/testcfg.py Fri Mar 18 12:41:05
2011
+++ /branches/bleeding_edge/test/benchmarks/testcfg.py Mon Mar 21 05:57:25
2011
@@ -84,7 +84,7 @@
def __init__(self, context, root):
super(BenchmarkTestConfiguration, self).__init__(context, root)
- def ListTests(self, current_path, path, mode):
+ def ListTests(self, current_path, path, mode, variant_flags):
path = self.context.workspace
path = join(path, 'benchmarks')
test = BenchmarkTestCase(path, self.context, mode)
=======================================
--- /branches/bleeding_edge/test/cctest/cctest.status Fri Mar 18 14:51:10
2011
+++ /branches/bleeding_edge/test/cctest/cctest.status Mon Mar 21 05:57:25
2011
@@ -65,12 +65,6 @@
test-debug/DebuggerAgentProtocolOverflowHeader: SKIP
test-sockets/Socket: SKIP
-# BUG(1075): Some deserialization tests fail om ARM
-test-serialize/Deserialize: SKIP
-test-serialize/DeserializeFromSecondSerializationAndRunScript2: SKIP
-test-serialize/DeserializeAndRunScript2: SKIP
-test-serialize/DeserializeFromSecondSerialization: SKIP
-
##############################################################################
[ $arch == arm && $crankshaft ]
=======================================
--- /branches/bleeding_edge/test/cctest/testcfg.py Wed Mar 16 04:16:18 2011
+++ /branches/bleeding_edge/test/cctest/testcfg.py Mon Mar 21 05:57:25 2011
@@ -34,11 +34,12 @@
class CcTestCase(test.TestCase):
- def __init__(self, path, executable, mode, raw_name, dependency,
context):
+ def __init__(self, path, executable, mode, raw_name, dependency,
context, variant_flags):
super(CcTestCase, self).__init__(context, path, mode)
self.executable = executable
self.raw_name = raw_name
self.dependency = dependency
+ self.variant_flags = variant_flags
def GetLabel(self):
return "%s %s %s" % (self.mode, self.path[-2], self.path[-1])
@@ -50,6 +51,7 @@
serialization_file = join('obj', 'test', self.mode, 'serdes')
serialization_file += '_' + self.GetName()
serialization_file = join(self.context.buildspace, serialization_file)
+ serialization_file += ''.join(self.variant_flags).replace('-', '_')
serialization_option = '--testing_serialization_file=' +
serialization_file
result = [ self.executable, name, serialization_option ]
result += self.context.GetVmFlags(self, self.mode)
@@ -75,7 +77,7 @@
def GetBuildRequirements(self):
return ['cctests']
- def ListTests(self, current_path, path, mode):
+ def ListTests(self, current_path, path, mode, variant_flags):
executable = join('obj', 'test', mode, 'cctest')
if utils.IsWindows():
executable += '.exe'
@@ -93,7 +95,7 @@
if dependency != '':
dependency = relative_path[0] + '/' + dependency
if self.Contains(path, full_path):
- result.append(CcTestCase(full_path, executable, mode, raw_test,
dependency, self.context))
+ result.append(CcTestCase(full_path, executable, mode, raw_test,
dependency, self.context, variant_flags))
result.sort()
return result
=======================================
--- /branches/bleeding_edge/test/es5conform/testcfg.py Mon Jan 10 05:54:42
2011
+++ /branches/bleeding_edge/test/es5conform/testcfg.py Mon Mar 21 05:57:25
2011
@@ -73,7 +73,7 @@
def __init__(self, context, root):
super(ES5ConformTestConfiguration, self).__init__(context, root)
- def ListTests(self, current_path, path, mode):
+ def ListTests(self, current_path, path, mode, variant_flags):
tests = []
current_root = join(self.root, 'data', 'TestCases')
harness = []
=======================================
--- /branches/bleeding_edge/test/message/testcfg.py Mon Jan 10 05:54:42 2011
+++ /branches/bleeding_edge/test/message/testcfg.py Mon Mar 21 05:57:25 2011
@@ -103,7 +103,7 @@
else:
return []
- def ListTests(self, current_path, path, mode):
+ def ListTests(self, current_path, path, mode, variant_flags):
mjsunit = [current_path + [t] for t in self.Ls(self.root)]
regress = [current_path + ['regress', t] for t in
self.Ls(join(self.root, 'regress'))]
bugs = [current_path + ['bugs', t] for t in
self.Ls(join(self.root, 'bugs'))]
=======================================
--- /branches/bleeding_edge/test/mjsunit/testcfg.py Fri Mar 18 13:35:07 2011
+++ /branches/bleeding_edge/test/mjsunit/testcfg.py Mon Mar 21 05:57:25 2011
@@ -120,7 +120,7 @@
return name.endswith('.js') and name != 'mjsunit.js'
return [f[:-3] for f in os.listdir(path) if SelectTest(f)]
- def ListTests(self, current_path, path, mode):
+ def ListTests(self, current_path, path, mode, variant_flags):
mjsunit = [current_path + [t] for t in self.Ls(self.root)]
regress = [current_path + ['regress', t] for t in
self.Ls(join(self.root, 'regress'))]
bugs = [current_path + ['bugs', t] for t in
self.Ls(join(self.root, 'bugs'))]
=======================================
--- /branches/bleeding_edge/test/mozilla/testcfg.py Tue Dec 7 03:01:02 2010
+++ /branches/bleeding_edge/test/mozilla/testcfg.py Mon Mar 21 05:57:25 2011
@@ -92,7 +92,7 @@
def __init__(self, context, root):
super(MozillaTestConfiguration, self).__init__(context, root)
- def ListTests(self, current_path, path, mode):
+ def ListTests(self, current_path, path, mode, variant_flags):
tests = []
for test_dir in TEST_DIRS:
current_root = join(self.root, 'data', test_dir)
=======================================
--- /branches/bleeding_edge/test/sputnik/testcfg.py Wed Feb 23 22:38:45 2011
+++ /branches/bleeding_edge/test/sputnik/testcfg.py Mon Mar 21 05:57:25 2011
@@ -81,7 +81,7 @@
def __init__(self, context, root):
super(SputnikTestConfiguration, self).__init__(context, root)
- def ListTests(self, current_path, path, mode):
+ def ListTests(self, current_path, path, mode, variant_flags):
# Import the sputnik test runner script as a module
testroot = join(self.root, 'sputniktests')
modroot = join(testroot, 'tools')
=======================================
--- /branches/bleeding_edge/tools/test.py Fri Mar 18 13:35:07 2011
+++ /branches/bleeding_edge/tools/test.py Mon Mar 21 05:57:25 2011
@@ -614,7 +614,7 @@
def AddTestsToList(self, result, current_path, path, context, mode):
for v in VARIANT_FLAGS:
- tests = self.GetConfiguration(context).ListTests(current_path, path,
mode)
+ tests = self.GetConfiguration(context).ListTests(current_path, path,
mode, v)
for t in tests: t.variant_flags = v
result += tests
@@ -637,7 +637,7 @@
result += test.GetBuildRequirements(rest, context)
return result
- def ListTests(self, current_path, path, context, mode):
+ def ListTests(self, current_path, path, context, mode, variant_flags):
(name, rest) = CarCdr(path)
result = [ ]
for test in self.tests:
@@ -1419,7 +1419,7 @@
'simulator': options.simulator,
'crankshaft': options.crankshaft
}
- test_list = root.ListTests([], path, context, mode)
+ test_list = root.ListTests([], path, context, mode, [])
unclassified_tests += test_list
(cases, unused_rules, all_outcomes) =
config.ClassifyTests(test_list, env)
if globally_unused_rules is None:
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev