Change cctests to use variant flags as part of the name for the serilization file.
authorricow@chromium.org <ricow@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 21 Mar 2011 12:57:25 +0000 (12:57 +0000)
committerricow@chromium.org <ricow@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 21 Mar 2011 12:57:25 +0000 (12:57 +0000)
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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7285 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

test/benchmarks/testcfg.py
test/cctest/cctest.status
test/cctest/testcfg.py
test/es5conform/testcfg.py
test/message/testcfg.py
test/mjsunit/testcfg.py
test/mozilla/testcfg.py
test/sputnik/testcfg.py
tools/test.py

index f0ff15b..51d8520 100644 (file)
@@ -84,7 +84,7 @@ class BenchmarkTestConfiguration(test.TestConfiguration):
   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)
index 7faeb21..fcf0fbf 100644 (file)
@@ -65,12 +65,6 @@ test-log/ProfLazyMode: SKIP
 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 ]
 
index 8afdb36..a137275 100644 (file)
@@ -34,11 +34,12 @@ import utils
 
 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 @@ class CcTestCase(test.TestCase):
     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 @@ class CcTestConfiguration(test.TestConfiguration):
   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 @@ class CcTestConfiguration(test.TestConfiguration):
       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
 
index e3a60cc..af74b8c 100644 (file)
@@ -73,7 +73,7 @@ class ES5ConformTestConfiguration(test.TestConfiguration):
   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 = []
index 21a0428..aabbfef 100644 (file)
@@ -103,7 +103,7 @@ class MessageTestConfiguration(test.TestConfiguration):
     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'))]
index 7df92f9..3dd6581 100644 (file)
@@ -120,7 +120,7 @@ class MjsunitTestConfiguration(test.TestConfiguration):
       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'))]
index 7a6438f..3728f79 100644 (file)
@@ -92,7 +92,7 @@ class MozillaTestConfiguration(test.TestConfiguration):
   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)
index 31e4b22..c1e3c1b 100644 (file)
@@ -81,7 +81,7 @@ class SputnikTestConfiguration(test.TestConfiguration):
   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')
index 59f93be..066a559 100755 (executable)
@@ -614,7 +614,7 @@ class TestRepository(TestSuite):
 
   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 @@ class LiteralTestSuite(TestSuite):
         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 @@ def Main():
         '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: