Skip to content
Snippets Groups Projects
Commit 8b2b718c authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

hg-perf: add support for a setup script

Not that we can operate in a copy, we can start altering the repository.
parent c2554edc
No related branches found
No related tags found
1 merge request!14perf-unbundle
......@@ -139,6 +139,11 @@
Arguments to pass to the command (a list of string).
setup-script
~~~~~~~~~~~~
a shell script to run before running the perf-command.
variants
--------
......@@ -180,3 +185,8 @@
~~~
overwrite the global `hg-perf-ext.cwd` variable. Behave the same.
setup-script
~~~~~~~~~~~~
overwrite the global `hg-perf-ext.setup-script` variable. Behave the same.
......@@ -251,6 +251,9 @@
args = variants[selected].get('args')
if args:
self._data['hg-perf-ext']['args'].extend(args)
setup_script = variants[selected].get('setup-script')
if setup_script:
self._data['hg-perf-ext']['setup-script'] = setup_script
@property
def all_dimensions(self):
......@@ -301,6 +304,15 @@
cfg_cwd = data_var(key)
cwd = os.path.join(cwd, cfg_cwd)
setup_script = self.get_var('hg-perf-ext.setup-script')
if setup_script is not None:
subprocess.check_call(
setup_script,
shell=True,
cwd=cwd,
executable='/bin/bash',
)
cmd = [
shell_path,
'hg',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment