Skip to content

Commit 2eef6e4

Browse files
Fix deopt fuzzer after test runner changes.
Use the same keyboard interrupt logic as run-tests. Close the perf database explicitly after one run, as it has two runs on the same architecture. Currently the first run closes on garbage collection, which might corrupt the second run. BUG= [email protected] Review URL: https://codereview.chromium.org/284203002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21330 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
1 parent 3c9e198 commit 2eef6e4

File tree

2 files changed

+15
-24
lines changed

2 files changed

+15
-24
lines changed

tools/run-deopt-fuzzer.py

+14-24
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,11 @@ def Main():
319319

320320
for mode in options.mode:
321321
for arch in options.arch:
322-
code = Execute(arch, mode, args, options, suites, workspace)
323-
exit_code = exit_code or code
322+
try:
323+
code = Execute(arch, mode, args, options, suites, workspace)
324+
exit_code = exit_code or code
325+
except KeyboardInterrupt:
326+
return 2
324327
return exit_code
325328

326329

@@ -409,17 +412,11 @@ def Execute(arch, mode, args, options, suites, workspace):
409412
print "No tests to run."
410413
return 0
411414

412-
try:
413-
print(">>> Collection phase")
414-
progress_indicator = progress.PROGRESS_INDICATORS[options.progress]()
415-
runner = execution.Runner(suites, progress_indicator, ctx)
415+
print(">>> Collection phase")
416+
progress_indicator = progress.PROGRESS_INDICATORS[options.progress]()
417+
runner = execution.Runner(suites, progress_indicator, ctx)
416418

417-
exit_code = runner.Run(options.j)
418-
if runner.terminate:
419-
return exit_code
420-
421-
except KeyboardInterrupt:
422-
return 1
419+
exit_code = runner.Run(options.j)
423420

424421
print(">>> Analysis phase")
425422
num_tests = 0
@@ -462,19 +459,12 @@ def Execute(arch, mode, args, options, suites, workspace):
462459
print "No tests to run."
463460
return 0
464461

465-
try:
466-
print(">>> Deopt fuzzing phase (%d test cases)" % num_tests)
467-
progress_indicator = progress.PROGRESS_INDICATORS[options.progress]()
468-
runner = execution.Runner(suites, progress_indicator, ctx)
469-
470-
exit_code = runner.Run(options.j)
471-
if runner.terminate:
472-
return exit_code
462+
print(">>> Deopt fuzzing phase (%d test cases)" % num_tests)
463+
progress_indicator = progress.PROGRESS_INDICATORS[options.progress]()
464+
runner = execution.Runner(suites, progress_indicator, ctx)
473465

474-
except KeyboardInterrupt:
475-
return 1
476-
477-
return exit_code
466+
code = runner.Run(options.j)
467+
return exit_code or code
478468

479469

480470
if __name__ == "__main__":

tools/testrunner/local/execution.py

+1
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ def _RunInternal(self, jobs):
138138
self.indicator.HasRun(test, has_unexpected_output)
139139
finally:
140140
pool.terminate()
141+
self.perf_data_manager.close()
141142
if queued_exception:
142143
raise queued_exception
143144

0 commit comments

Comments
 (0)