forked from mirrors/gecko-dev
Bug 1732376 - Add a --clean option to remove the raptor venv before running r=sparky,perftest-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D139830
This commit is contained in:
parent
e42e4d2e06
commit
9fd67f43ed
4 changed files with 28 additions and 0 deletions
|
|
@ -214,6 +214,9 @@ tps_result\.json
|
||||||
^testing/raptor/raptor/tests/json/
|
^testing/raptor/raptor/tests/json/
|
||||||
^testing/raptor/webext/raptor/auto_gen_test_config.js
|
^testing/raptor/webext/raptor/auto_gen_test_config.js
|
||||||
|
|
||||||
|
# Ignore condprofile build directory
|
||||||
|
^testing/condprofile/build
|
||||||
|
|
||||||
# Ignore browsertime output directory
|
# Ignore browsertime output directory
|
||||||
^browsertime-results
|
^browsertime-results
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -530,6 +530,18 @@ class Raptor(
|
||||||
"help": "Enable marionette tracing",
|
"help": "Enable marionette tracing",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
["--clean"],
|
||||||
|
{
|
||||||
|
"action": "store_true",
|
||||||
|
"dest": "clean",
|
||||||
|
"default": False,
|
||||||
|
"help": (
|
||||||
|
"Clean the python virtualenv (remove, and rebuild) for "
|
||||||
|
"Raptor before running tests."
|
||||||
|
),
|
||||||
|
},
|
||||||
|
],
|
||||||
]
|
]
|
||||||
+ testing_config_options
|
+ testing_config_options
|
||||||
+ copy.deepcopy(code_coverage_config_options)
|
+ copy.deepcopy(code_coverage_config_options)
|
||||||
|
|
@ -648,6 +660,7 @@ class Raptor(
|
||||||
self.browsertime_video = False
|
self.browsertime_video = False
|
||||||
self.enable_marionette_trace = self.config.get("enable_marionette_trace")
|
self.enable_marionette_trace = self.config.get("enable_marionette_trace")
|
||||||
self.browser_cycles = self.config.get("browser_cycles")
|
self.browser_cycles = self.config.get("browser_cycles")
|
||||||
|
self.clean = self.config.get("clean")
|
||||||
|
|
||||||
for (arg,), details in Raptor.browsertime_options:
|
for (arg,), details in Raptor.browsertime_options:
|
||||||
# Allow overriding defaults on the `./mach raptor-test ...` command-line.
|
# Allow overriding defaults on the `./mach raptor-test ...` command-line.
|
||||||
|
|
@ -987,6 +1000,9 @@ class Raptor(
|
||||||
# We need it in-path to import jsonschema later when validating output for perfherder.
|
# We need it in-path to import jsonschema later when validating output for perfherder.
|
||||||
_virtualenv_path = self.config.get("virtualenv_path")
|
_virtualenv_path = self.config.get("virtualenv_path")
|
||||||
|
|
||||||
|
if self.clean:
|
||||||
|
rmtree(_virtualenv_path)
|
||||||
|
|
||||||
if self.run_local and os.path.exists(_virtualenv_path):
|
if self.run_local and os.path.exists(_virtualenv_path):
|
||||||
self.info("Virtualenv already exists, skipping creation")
|
self.info("Virtualenv already exists, skipping creation")
|
||||||
# ffmpeg exists outside of this virtual environment so
|
# ffmpeg exists outside of this virtual environment so
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,7 @@ class RaptorRunner(MozbuildObject):
|
||||||
self.device_name = kwargs["device_name"]
|
self.device_name = kwargs["device_name"]
|
||||||
self.enable_marionette_trace = kwargs["enable_marionette_trace"]
|
self.enable_marionette_trace = kwargs["enable_marionette_trace"]
|
||||||
self.browsertime_visualmetrics = kwargs["browsertime_visualmetrics"]
|
self.browsertime_visualmetrics = kwargs["browsertime_visualmetrics"]
|
||||||
|
self.clean = kwargs["clean"]
|
||||||
|
|
||||||
if Conditions.is_android(self) or kwargs["app"] in ANDROID_BROWSERS:
|
if Conditions.is_android(self) or kwargs["app"] in ANDROID_BROWSERS:
|
||||||
self.binary_path = None
|
self.binary_path = None
|
||||||
|
|
@ -178,6 +179,7 @@ class RaptorRunner(MozbuildObject):
|
||||||
"enable_marionette_trace": self.enable_marionette_trace,
|
"enable_marionette_trace": self.enable_marionette_trace,
|
||||||
"browsertime_visualmetrics": self.browsertime_visualmetrics,
|
"browsertime_visualmetrics": self.browsertime_visualmetrics,
|
||||||
"mozbuild_path": get_state_dir(),
|
"mozbuild_path": get_state_dir(),
|
||||||
|
"clean": self.clean,
|
||||||
}
|
}
|
||||||
|
|
||||||
sys.path.insert(0, os.path.join(self.topsrcdir, "tools", "browsertime"))
|
sys.path.insert(0, os.path.join(self.topsrcdir, "tools", "browsertime"))
|
||||||
|
|
|
||||||
|
|
@ -429,6 +429,13 @@ def create_parser(mach_interface=False):
|
||||||
default=False,
|
default=False,
|
||||||
help="Enable marionette tracing",
|
help="Enable marionette tracing",
|
||||||
)
|
)
|
||||||
|
add_arg(
|
||||||
|
"--clean",
|
||||||
|
dest="clean",
|
||||||
|
action="store_true",
|
||||||
|
default=False,
|
||||||
|
help="Clean the python virtualenv (remove, and rebuild) for Raptor before running tests.",
|
||||||
|
)
|
||||||
|
|
||||||
add_logging_group(parser)
|
add_logging_group(parser)
|
||||||
return parser
|
return parser
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue