diff options
Diffstat (limited to 'deps/v8/tools/run-deopt-fuzzer.py')
-rwxr-xr-x | deps/v8/tools/run-deopt-fuzzer.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/deps/v8/tools/run-deopt-fuzzer.py b/deps/v8/tools/run-deopt-fuzzer.py index 70e106ec1b..e4d8f16b4f 100755 --- a/deps/v8/tools/run-deopt-fuzzer.py +++ b/deps/v8/tools/run-deopt-fuzzer.py @@ -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 |