Revision: 21330
Author:   [email protected]
Date:     Thu May 15 12:40:40 2014 UTC
Log:      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
http://code.google.com/p/v8/source/detail?r=21330

Modified:
 /branches/bleeding_edge/tools/run-deopt-fuzzer.py
 /branches/bleeding_edge/tools/testrunner/local/execution.py

=======================================
--- /branches/bleeding_edge/tools/run-deopt-fuzzer.py Thu Apr 10 10:43:13 2014 UTC +++ /branches/bleeding_edge/tools/run-deopt-fuzzer.py Thu May 15 12:40:40 2014 UTC
@@ -319,8 +319,11 @@

   for mode in options.mode:
     for arch in options.arch:
-      code = Execute(arch, mode, args, options, suites, workspace)
-      exit_code = exit_code or code
+      try:
+        code = Execute(arch, mode, args, options, suites, workspace)
+        exit_code = exit_code or code
+      except KeyboardInterrupt:
+        return 2
   return exit_code


@@ -409,17 +412,11 @@
     print "No tests to run."
     return 0

-  try:
-    print(">>> Collection phase")
-    progress_indicator = progress.PROGRESS_INDICATORS[options.progress]()
-    runner = execution.Runner(suites, progress_indicator, ctx)
+  print(">>> Collection phase")
+  progress_indicator = progress.PROGRESS_INDICATORS[options.progress]()
+  runner = execution.Runner(suites, progress_indicator, ctx)

-    exit_code = runner.Run(options.j)
-    if runner.terminate:
-      return exit_code
-
-  except KeyboardInterrupt:
-    return 1
+  exit_code = runner.Run(options.j)

   print(">>> Analysis phase")
   num_tests = 0
@@ -462,19 +459,12 @@
     print "No tests to run."
     return 0

-  try:
-    print(">>> Deopt fuzzing phase (%d test cases)" % num_tests)
-    progress_indicator = progress.PROGRESS_INDICATORS[options.progress]()
-    runner = execution.Runner(suites, progress_indicator, ctx)
-
-    exit_code = runner.Run(options.j)
-    if runner.terminate:
-      return exit_code
-
-  except KeyboardInterrupt:
-    return 1
+  print(">>> Deopt fuzzing phase (%d test cases)" % num_tests)
+  progress_indicator = progress.PROGRESS_INDICATORS[options.progress]()
+  runner = execution.Runner(suites, progress_indicator, ctx)

-  return exit_code
+  code = runner.Run(options.j)
+  return exit_code or code


 if __name__ == "__main__":
=======================================
--- /branches/bleeding_edge/tools/testrunner/local/execution.py Thu May 15 12:01:34 2014 UTC +++ /branches/bleeding_edge/tools/testrunner/local/execution.py Thu May 15 12:40:40 2014 UTC
@@ -138,6 +138,7 @@
         self.indicator.HasRun(test, has_unexpected_output)
     finally:
       pool.terminate()
+      self.perf_data_manager.close()
     if queued_exception:
       raise queued_exception

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to