Reviewers: Jakob, Michael Achenbach,

Message:
Jakob: PTAL.
Michael: FYI.

Description:
Add flag to test harness to stop sorting test cases.

[email protected],[email protected]

Please review this at https://codereview.chromium.org/307553003/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+12, -5 lines):
  M tools/run-tests.py
  M tools/testrunner/local/execution.py
  M tools/testrunner/objects/context.py


Index: tools/run-tests.py
diff --git a/tools/run-tests.py b/tools/run-tests.py
index b02fcfa94166fa0d516645a68f46b69de90a384b..8018ba9d3d2145a724121ff0838decea27652d08 100755
--- a/tools/run-tests.py
+++ b/tools/run-tests.py
@@ -157,6 +157,9 @@ def BuildOptions():
   result.add_option("--no-snap", "--nosnap",
                     help='Test a build compiled without snapshot.',
                     default=False, dest="no_snap", action="store_true")
+  result.add_option("--no-sorting", "--nosorting",
+ help="Don't sort tests according to duration of last run.",
+                    default=False, dest="no_sorting", action="store_true")
   result.add_option("--no-stress", "--nostress",
help="Don't run crankshaft --always-opt --stress-op test",
                     default=False, dest="no_stress", action="store_true")
@@ -411,7 +414,8 @@ def Execute(arch, mode, args, options, suites, workspace):
                         options.command_prefix,
                         options.extra_flags,
                         options.no_i18n,
-                        options.random_seed)
+                        options.random_seed,
+                        options.no_sorting)

   # TODO(all): Combine "simulator" and "simulator_run".
   simulator_run = not options.dont_skip_simulator_slow_tests and \
Index: tools/testrunner/local/execution.py
diff --git a/tools/testrunner/local/execution.py b/tools/testrunner/local/execution.py index 4dc62c2e90066032c2dd3412987a729786c14b9c..97f8f33f8aa4fd888d20e0c6fa0ac976d1df95e3 100644
--- a/tools/testrunner/local/execution.py
+++ b/tools/testrunner/local/execution.py
@@ -65,7 +65,8 @@ class Runner(object):
self.perfdata = self.perf_data_manager.GetStore(context.arch, context.mode)
     self.tests = [ t for s in suites for t in s.tests ]
     for t in self.tests:
-      t.duration = self.perfdata.FetchPerfData(t) or 1.0
+      if not context.no_sorting:
+        t.duration = self.perfdata.FetchPerfData(t) or 1.0
     self._CommonInit(len(self.tests), progress_indicator, context)

   def _CommonInit(self, num_tests, progress_indicator, context):
Index: tools/testrunner/objects/context.py
diff --git a/tools/testrunner/objects/context.py b/tools/testrunner/objects/context.py index 68c19892410bf63643c17fe70c358d47cb69e327..f8f764b3a6cf63e10a55b1758df824df07430cdc 100644
--- a/tools/testrunner/objects/context.py
+++ b/tools/testrunner/objects/context.py
@@ -28,7 +28,8 @@

 class Context():
   def __init__(self, arch, mode, shell_dir, mode_flags, verbose, timeout,
-               isolates, command_prefix, extra_flags, noi18n, random_seed):
+               isolates, command_prefix, extra_flags, noi18n, random_seed,
+               no_sorting):
     self.arch = arch
     self.mode = mode
     self.shell_dir = shell_dir
@@ -40,15 +41,16 @@ class Context():
     self.extra_flags = extra_flags
     self.noi18n = noi18n
     self.random_seed = random_seed
+    self.no_sorting = no_sorting

   def Pack(self):
return [self.arch, self.mode, self.mode_flags, self.timeout, self.isolates,
             self.command_prefix, self.extra_flags, self.noi18n,
-            self.random_seed]
+            self.random_seed, self.no_sorting]

   @staticmethod
   def Unpack(packed):
     # For the order of the fields, refer to Pack() above.
     return Context(packed[0], packed[1], None, packed[2], False,
                    packed[3], packed[4], packed[5], packed[6], packed[7],
-                   packed[8])
+                   packed[8], packed[9])


--
--
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