Commit a65edb8b authored by yangguo's avatar yangguo Committed by Commit bot

Improve test-serialize test cases.

Changes include:
 - better test coverage for builds with snapshot
 - write snapshot blobs to buffer instead of test serialization files
 - renamed tests

R=machenbach@chromium.org

Review URL: https://codereview.chromium.org/1777213002

Cr-Commit-Position: refs/heads/master@{#34657}
parent 25279332
......@@ -99,7 +99,7 @@
# Some tests are just too slow to run for now.
'test-heap/IncrementalMarkingStepMakesBigProgressWithLargeObjects': [PASS, NO_VARIANTS],
'test-heap-profiler/ManyLocalsInSharedContext': [PASS, NO_VARIANTS],
'test-serialize/SerializeToplevelLargeCodeObject': [PASS, NO_VARIANTS],
'test-serialize/CodeSerializerLargeCodeObject': [PASS, NO_VARIANTS],
'test-debug/ThreadedDebugging': [PASS, NO_VARIANTS],
# BUG(3742).
'test-mark-compact/MarkCompactCollector': [PASS, ['arch==arm', NO_VARIANTS]],
......@@ -151,8 +151,8 @@
'test-api/Bug618': [PASS],
# BUG(v8:3385).
'test-serialize/DeserializeFromSecondSerialization': [PASS, FAIL],
'test-serialize/DeserializeFromSecondSerializationAndRunScript2': [PASS, FAIL],
'test-serialize/StartupSerializerOnceRunScript': [PASS, FAIL],
'test-serialize/StartupSerializerTwiceRunScript': [PASS, FAIL],
# BUG(v8:3154).
'test-heap/ReleaseOverReservedPages': [PASS, FAIL],
......@@ -296,10 +296,10 @@
'test-log/ProfLazyMode': [SKIP],
# BUG(1075): Unresolved crashes.
'test-serialize/Deserialize': [SKIP],
'test-serialize/DeserializeFromSecondSerializationAndRunScript2': [SKIP],
'test-serialize/DeserializeAndRunScript2': [SKIP],
'test-serialize/DeserializeFromSecondSerialization': [SKIP],
'test-serialize/StartupSerializerOnce': [SKIP],
'test-serialize/StartupSerializerTwice': [SKIP],
'test-serialize/StartupSerializerOnceRunScript': [SKIP],
'test-serialize/StartupSerializerTwiceRunScript': [SKIP],
############################################################################
# Slow tests.
......@@ -321,10 +321,10 @@
'test-heap/TestSizeOfRegExpCode': [SKIP],
# BUG(1075): Unresolved crashes on MIPS also.
'test-serialize/Deserialize': [SKIP],
'test-serialize/DeserializeFromSecondSerializationAndRunScript2': [SKIP],
'test-serialize/DeserializeAndRunScript2': [SKIP],
'test-serialize/DeserializeFromSecondSerialization': [SKIP],
'test-serialize/StartupSerializerOnce': [SKIP],
'test-serialize/StartupSerializerTwice': [SKIP],
'test-serialize/StartupSerializerOnceRunScript': [SKIP],
'test-serialize/StartupSerializerTwiceRunScript': [SKIP],
}], # 'arch == mipsel or arch == mips'
##############################################################################
......@@ -348,10 +348,10 @@
'test-heap/TestSizeOfRegExpCode': [SKIP],
# BUG(1075): Unresolved crashes on MIPS also.
'test-serialize/Deserialize': [SKIP],
'test-serialize/DeserializeFromSecondSerializationAndRunScript2': [SKIP],
'test-serialize/DeserializeAndRunScript2': [SKIP],
'test-serialize/DeserializeFromSecondSerialization': [SKIP],
'test-serialize/StartupSerializerOnce': [SKIP],
'test-serialize/StartupSerializerTwice': [SKIP],
'test-serialize/StartupSerializerOnceRunScript': [SKIP],
'test-serialize/StartupSerializerTwiceRunScript': [SKIP],
}], # 'arch == mips64el or arch == mips64'
##############################################################################
......@@ -563,7 +563,7 @@
'test-heap/CompilationCacheCachingBehavior': [FAIL],
'test-heap/CellsInOptimizedCodeAreWeak': [FAIL],
'test-run-inlining/InlineTwice': [FAIL],
'test-serialize/SerializeInternalReference': [FAIL, ['arch == arm or arch == arm64', PASS]],
'test-serialize/CodeSerializerInternalReference': [FAIL, ['arch == arm or arch == arm64', PASS]],
}], # ignition == True
......
This diff is collapsed.
......@@ -42,15 +42,6 @@ class CcTestSuite(testsuite.TestSuite):
build_dir = "build"
else:
build_dir = "out"
self.serdes_dir = os.path.normpath(
os.path.join(root, "..", "..", build_dir, ".serdes"))
def SetupWorkingDirectory(self):
# This is only called once per machine, while init above is called once per
# process.
if os.path.exists(self.serdes_dir):
shutil.rmtree(self.serdes_dir, True)
os.makedirs(self.serdes_dir)
def ListTests(self, context):
shell = os.path.abspath(os.path.join(context.shell_dir, self.shell()))
......@@ -72,10 +63,7 @@ class CcTestSuite(testsuite.TestSuite):
def GetFlagsForTestCase(self, testcase, context):
testname = testcase.path.split(os.path.sep)[-1]
serialization_file = os.path.join(self.serdes_dir, "serdes_" + testname)
serialization_file += ''.join(testcase.flags).replace('-', '_')
return (testcase.flags + [testcase.path] + context.mode_flags +
["--testing_serialization_file=" + serialization_file])
return (testcase.flags + [testcase.path] + context.mode_flags)
def shell(self):
return "cctest"
......
......@@ -321,7 +321,6 @@ def Main():
suite = testsuite.TestSuite.LoadTestSuite(
os.path.join(BASE_DIR, "test", root))
if suite:
suite.SetupWorkingDirectory()
suites.append(suite)
if options.download_data:
......
......@@ -626,7 +626,6 @@ def Main():
suite = testsuite.TestSuite.LoadTestSuite(
os.path.join(BASE_DIR, "test", root))
if suite:
suite.SetupWorkingDirectory()
suites.append(suite)
if options.download_data or options.download_data_only:
......
......@@ -102,7 +102,6 @@ class TestSuite(object):
def __init__(self, name, root):
# Note: This might be called concurrently from different processes.
# Changing harddisk state should be done in 'SetupWorkingDirectory' below.
self.name = name # string
self.root = root # string containing path
self.tests = None # list of TestCase objects
......@@ -110,11 +109,6 @@ class TestSuite(object):
self.wildcards = None # dictionary mapping test paths to list of outcomes
self.total_duration = None # float, assigned on demand
def SetupWorkingDirectory(self):
# This is called once per test suite object in a multi-process setting.
# Multi-process-unsafe work-directory setup can go here.
pass
def shell(self):
return "d8"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment