Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Raphaël Gomès
repo-bencher
Commits
90b4c87d124f
Commit
627e1e18
authored
Jun 19, 2020
by
Raphaël Gomès
Browse files
Force environment variables for hg upstream
These won't affect jane's fast-path
parent
d159da232cf9
Changes
1
Hide whitespace changes
Inline
Side-by-side
bench.py
View file @
90b4c87d
...
@@ -70,9 +70,16 @@ def run_repo_command(
...
@@ -70,9 +70,16 @@ def run_repo_command(
out_path
.
parent
.
mkdir
(
parents
=
True
,
exist_ok
=
True
)
out_path
.
parent
.
mkdir
(
parents
=
True
,
exist_ok
=
True
)
out_path
.
touch
(
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
=
(
full_cmd
=
(
f
"
{
executable
}
{
cmd
}
{
subprocess_args
}
"
f
"
{
env_string
}
{
executable
}
{
cmd
}
{
subprocess_args
}
"
f
"
>
{
log_dir
/
'stdout'
}
2>
{
log_dir
/
'stderr'
}
"
f
">
{
log_dir
/
'stdout'
}
2>
{
log_dir
/
'stderr'
}
"
)
)
full_cmd
=
(
full_cmd
=
(
f
"hyperfine --warmup 3 --show-output "
f
"hyperfine --warmup 3 --show-output "
...
@@ -112,14 +119,15 @@ if __name__ == "__main__":
...
@@ -112,14 +119,15 @@ if __name__ == "__main__":
"--executable"
,
"--executable"
,
dest
=
"executables"
,
dest
=
"executables"
,
action
=
"append"
,
action
=
"append"
,
default
=
[
"hg"
]
,
required
=
True
,
help
=
"Executable(s) to run the tests with"
,
help
=
"Executable(s) to run the tests with"
,
)
)
(
known
,
others
)
=
parser
.
parse_known_args
()
(
known
,
others
)
=
parser
.
parse_known_args
()
if
others
and
others
[
0
]
!=
"--"
:
if
others
and
others
[
0
]
!=
"--"
:
print
(
print
(
"abort: use '--' pass arguments to the subprocess"
,
file
=
sys
.
stderr
"abort: use '--' to pass arguments to the subprocess"
,
file
=
sys
.
stderr
,
)
)
exit
(
255
)
exit
(
255
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment