Commit 504796e9 authored by machenbach's avatar machenbach Committed by Commit bot

[Swarming] Isolate deopt fuzzer.

This also ports a few changes from run-test.py to make sure
cwd = v8 root directory.

BUG=chromium:535160
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34110}
parent 582ea681
......@@ -38,6 +38,7 @@
'../test/webkit/webkit.gyp:*',
'../tools/check-static-initializers.gyp:*',
'../tools/gcmole/run_gcmole.gyp:*',
'../tools/run-deopt-fuzzer.gyp:*',
'../tools/run-valgrind.gyp:*',
],
}],
......
# Copyright 2016 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'conditions': [
['test_isolation_mode != "noop"', {
'targets': [
{
'target_name': 'run_deopt_fuzzer_run',
'type': 'none',
'dependencies': [
'../src/d8.gyp:d8_run',
],
'includes': [
'../build/features.gypi',
'../build/isolate.gypi',
],
'sources': [
'run-deopt-fuzzer.isolate',
],
},
],
}],
],
}
# Copyright 2016 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'variables': {
'command': [
'run-deopt-fuzzer.py',
],
'files': [
'run-deopt-fuzzer.py',
],
},
'includes': [
'testrunner/testrunner.isolate',
'../src/d8.isolate',
'../test/mjsunit/mjsunit.isolate',
'../test/webkit/webkit.isolate',
],
}
......@@ -48,6 +48,9 @@ from testrunner.local import verbose
from testrunner.objects import context
# Base dir of the v8 checkout to be used as cwd.
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
ARCH_GUESS = utils.DefaultArch()
DEFAULT_TESTS = ["mjsunit", "webkit"]
TIMEOUT_DEFAULT = 60
......@@ -290,6 +293,9 @@ def ShardTests(tests, shard_count, shard_run):
def Main():
# Use the v8 root as cwd as some test cases use "load" with relative paths.
os.chdir(BASE_DIR)
parser = BuildOptions()
(options, args) = parser.parse_args()
if not ProcessOptions(options):
......@@ -297,9 +303,8 @@ def Main():
return 1
exit_code = 0
workspace = os.path.abspath(join(os.path.dirname(sys.argv[0]), ".."))
suite_paths = utils.GetSuitePaths(join(workspace, "test"))
suite_paths = utils.GetSuitePaths(join(BASE_DIR, "test"))
if len(args) == 0:
suite_paths = [ s for s in suite_paths if s in DEFAULT_TESTS ]
......@@ -314,7 +319,7 @@ def Main():
suites = []
for root in suite_paths:
suite = testsuite.TestSuite.LoadTestSuite(
os.path.join(workspace, "test", root))
os.path.join(BASE_DIR, "test", root))
if suite:
suite.SetupWorkingDirectory()
suites.append(suite)
......@@ -326,7 +331,7 @@ def Main():
for mode in options.mode:
for arch in options.arch:
try:
code = Execute(arch, mode, args, options, suites, workspace)
code = Execute(arch, mode, args, options, suites, BASE_DIR)
exit_code = exit_code or code
except KeyboardInterrupt:
return 2
......
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