Commit 627e1e18 authored by Raphaël Gomès's avatar Raphaël Gomès
Browse files

Force environment variables for hg upstream

These won't affect jane's fast-path
parent d159da232cf9
......@@ -70,9 +70,16 @@ def run_repo_command(
out_path.parent.mkdir(parents=True, exist_ok=True)
out_path.touch(exist_ok=True)
# Pass the env to the subcommand of hyperfine, otherwise it won't work
env = {
"HGMODULEPOLICY": "rust+c",
"RUST_LOG": "trace",
}
env_string = " ".join(f"{k}={v}" for k, v in env.items())
full_cmd = (
f"{executable} {cmd} {subprocess_args}"
f" > {log_dir / 'stdout'} 2> {log_dir / 'stderr'}"
f"{env_string} {executable} {cmd} {subprocess_args} "
f"> {log_dir / 'stdout'} 2> {log_dir / 'stderr'}"
)
full_cmd = (
f"hyperfine --warmup 3 --show-output "
......@@ -112,14 +119,15 @@ if __name__ == "__main__":
"--executable",
dest="executables",
action="append",
default=["hg"],
required=True,
help="Executable(s) to run the tests with",
)
(known, others) = parser.parse_known_args()
if others and others[0] != "--":
print(
"abort: use '--' pass arguments to the subprocess", file=sys.stderr
"abort: use '--' to pass arguments to the subprocess",
file=sys.stderr,
)
exit(255)
......
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