Revision: 21561
Author:   [email protected]
Date:     Wed May 28 10:49:10 2014 UTC
Log:      Add flag to test harness to stop sorting test cases.

[email protected], [email protected]

Review URL: https://codereview.chromium.org/307553003
http://code.google.com/p/v8/source/detail?r=21561

Modified:
 /branches/bleeding_edge/tools/run-tests.py
 /branches/bleeding_edge/tools/testrunner/local/execution.py
 /branches/bleeding_edge/tools/testrunner/objects/context.py

=======================================
--- /branches/bleeding_edge/tools/run-tests.py  Tue May 27 15:16:42 2014 UTC
+++ /branches/bleeding_edge/tools/run-tests.py  Wed May 28 10:49:10 2014 UTC
@@ -157,6 +157,9 @@
   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 @@
                         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 \
=======================================
--- /branches/bleeding_edge/tools/testrunner/local/execution.py Thu May 15 12:40:40 2014 UTC +++ /branches/bleeding_edge/tools/testrunner/local/execution.py Wed May 28 10:49:10 2014 UTC
@@ -94,7 +94,9 @@
     # while the queue is filled.
     queue = []
     queued_exception = None
-    for test in sorted(self.tests, key=lambda t: t.duration, reverse=True):
+    if not self.context.no_sorting:
+ self.tests = sorted(self.tests, key=lambda t: t.duration, reverse=True)
+    for test in self.tests:
       assert test.id >= 0
       test_map[test.id] = test
       try:
=======================================
--- /branches/bleeding_edge/tools/testrunner/objects/context.py Thu Apr 10 07:25:49 2014 UTC +++ /branches/bleeding_edge/tools/testrunner/objects/context.py Wed May 28 10:49:10 2014 UTC
@@ -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 @@
     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