Commit f39d1cd4 authored by machenbach's avatar machenbach Committed by Commit bot

[test] Switch off perf data feature on swarming.

The feature sometimes prevents subsequent swarming bots to
delete the work directory on windows.

The data file is not kept on swarming bots anyways, therefore
this switches off the feature completely.

BUG=chromium:535160
LOG=n

Review URL: https://codereview.chromium.org/1468933002

Cr-Commit-Position: refs/heads/master@{#32168}
parent a0ce8392
...@@ -380,7 +380,8 @@ def Execute(arch, mode, args, options, suites, workspace): ...@@ -380,7 +380,8 @@ def Execute(arch, mode, args, options, suites, workspace):
0, # Don't rerun failing tests. 0, # Don't rerun failing tests.
0, # No use of a rerun-failing-tests maximum. 0, # No use of a rerun-failing-tests maximum.
False, # No predictable mode. False, # No predictable mode.
False) # No no_harness mode. False, # No no_harness mode.
False) # Don't use perf data.
# Find available test suites and read test cases from them. # Find available test suites and read test cases from them.
variables = { variables = {
......
...@@ -313,6 +313,9 @@ def BuildOptions(): ...@@ -313,6 +313,9 @@ def BuildOptions():
result.add_option("--stress-only", result.add_option("--stress-only",
help="Only run tests with --always-opt --stress-opt", help="Only run tests with --always-opt --stress-opt",
default=False, action="store_true") default=False, action="store_true")
result.add_option("--swarming",
help="Indicates running test driver on swarming.",
default=False, action="store_true")
result.add_option("--time", help="Print timing information after running", result.add_option("--time", help="Print timing information after running",
default=False, action="store_true") default=False, action="store_true")
result.add_option("-t", "--timeout", help="Timeout in seconds", result.add_option("-t", "--timeout", help="Timeout in seconds",
...@@ -670,7 +673,8 @@ def Execute(arch, mode, args, options, suites): ...@@ -670,7 +673,8 @@ def Execute(arch, mode, args, options, suites):
options.rerun_failures_count, options.rerun_failures_count,
options.rerun_failures_max, options.rerun_failures_max,
options.predictable, options.predictable,
options.no_harness) options.no_harness,
use_perf_data=not options.swarming)
# TODO(all): Combine "simulator" and "simulator_run". # TODO(all): Combine "simulator" and "simulator_run".
simulator_run = not options.dont_skip_simulator_slow_tests and \ simulator_run = not options.dont_skip_simulator_slow_tests and \
......
...@@ -64,7 +64,8 @@ class Runner(object): ...@@ -64,7 +64,8 @@ class Runner(object):
def __init__(self, suites, progress_indicator, context): def __init__(self, suites, progress_indicator, context):
self.datapath = os.path.join("out", "testrunner_data") self.datapath = os.path.join("out", "testrunner_data")
self.perf_data_manager = perfdata.PerfDataManager(self.datapath) self.perf_data_manager = perfdata.GetPerfDataManager(
context, self.datapath)
self.perfdata = self.perf_data_manager.GetStore(context.arch, context.mode) self.perfdata = self.perf_data_manager.GetStore(context.arch, context.mode)
self.perf_failures = False self.perf_failures = False
self.printed_allocations = False self.printed_allocations = False
......
...@@ -118,3 +118,29 @@ class PerfDataManager(object): ...@@ -118,3 +118,29 @@ class PerfDataManager(object):
if not mode in modes: if not mode in modes:
modes[mode] = PerfDataStore(self.datadir, arch, mode) modes[mode] = PerfDataStore(self.datadir, arch, mode)
return modes[mode] return modes[mode]
class NullPerfDataStore(object):
def UpdatePerfData(self, test):
pass
def FetchPerfData(self, test):
return None
class NullPerfDataManager(object):
def __init__(self):
pass
def GetStore(self, *args, **kwargs):
return NullPerfDataStore()
def close(self):
pass
def GetPerfDataManager(context, datadir):
if context.use_perf_data:
return PerfDataManager(datadir)
else:
return NullPerfDataManager()
...@@ -30,7 +30,7 @@ class Context(): ...@@ -30,7 +30,7 @@ class Context():
def __init__(self, arch, mode, shell_dir, mode_flags, verbose, timeout, 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, rerun_failures_count, rerun_failures_max, no_sorting, rerun_failures_count, rerun_failures_max,
predictable, no_harness): predictable, no_harness, use_perf_data):
self.arch = arch self.arch = arch
self.mode = mode self.mode = mode
self.shell_dir = shell_dir self.shell_dir = shell_dir
...@@ -47,12 +47,14 @@ class Context(): ...@@ -47,12 +47,14 @@ class Context():
self.rerun_failures_max = rerun_failures_max self.rerun_failures_max = rerun_failures_max
self.predictable = predictable self.predictable = predictable
self.no_harness = no_harness self.no_harness = no_harness
self.use_perf_data = use_perf_data
def Pack(self): def Pack(self):
return [self.arch, self.mode, self.mode_flags, self.timeout, self.isolates, return [self.arch, self.mode, self.mode_flags, self.timeout, self.isolates,
self.command_prefix, self.extra_flags, self.noi18n, self.command_prefix, self.extra_flags, self.noi18n,
self.random_seed, self.no_sorting, self.rerun_failures_count, self.random_seed, self.no_sorting, self.rerun_failures_count,
self.rerun_failures_max, self.predictable, self.no_harness] self.rerun_failures_max, self.predictable, self.no_harness,
self.use_perf_data]
@staticmethod @staticmethod
def Unpack(packed): def Unpack(packed):
...@@ -60,4 +62,4 @@ class Context(): ...@@ -60,4 +62,4 @@ class Context():
return Context(packed[0], packed[1], None, packed[2], False, return Context(packed[0], packed[1], None, packed[2], False,
packed[3], packed[4], packed[5], packed[6], packed[7], packed[3], packed[4], packed[5], packed[6], packed[7],
packed[8], packed[9], packed[10], packed[11], packed[12], packed[8], packed[9], packed[10], packed[11], packed[12],
packed[13]) packed[13], packed[14])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment