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")
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 \
# 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:
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
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])