Skip to content

Commit 3886e89

Browse files
committed
refactor: specify explicit arguments for ab_test.py
Add arguments names for binary paths for ab_test.py Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
1 parent b457c83 commit 3886e89

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

.buildkite/pipeline_perf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
test_script_opts = ""
135135
if REVISION_A:
136136
devtool_opts += " --ab"
137-
test_script_opts = f'{ab_opts} run build/{REVISION_A}/ build/{REVISION_B} --pytest-opts "{test_selector}"'
137+
test_script_opts = f'{ab_opts} run --binaries-a build/{REVISION_A}/ --binaries-b build/{REVISION_B} --pytest-opts "{test_selector}"'
138138
else:
139139
# Passing `-m ''` below instructs pytest to collect tests regardless of
140140
# their markers (e.g. it will collect both tests marked as nonci, and

tests/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ function to [`.buildkite/pipeline_perf.py`](../.buildkite/pipeline_perf.py). To
184184
manually run an A/B-Test, use
185185

186186
```sh
187-
tools/devtool -y test --ab [optional arguments to ab_test.py] run <dir A> <dir B> --pytest-opts <test specification>
187+
tools/devtool -y test --ab [optional arguments to ab_test.py] run --binaries-a <dir A> --binaries-b <dir B> --pytest-opts <test specification>
188188
```
189189

190190
Here, _dir A_ and _dir B_ are directories containing firecracker and jailer

tools/ab_test.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -422,14 +422,16 @@ def ab_performance_test(
422422
help="Run an specific test of our test suite as an A/B-test across two specified commits",
423423
)
424424
run_parser.add_argument(
425-
"a_revision",
425+
"--binaries-a",
426426
help="Directory containing firecracker and jailer binaries to be considered the performance baseline",
427427
type=Path,
428+
required=True,
428429
)
429430
run_parser.add_argument(
430-
"b_revision",
431-
help="Directory containing firecracker and jailer binaries whose performance we want to compare against the results from a_revision",
431+
"--binaries-b",
432+
help="Directory containing firecracker and jailer binaries whose performance we want to compare against the results from binaries-a",
432433
type=Path,
434+
required=True,
433435
)
434436
run_parser.add_argument(
435437
"--pytest-opts",
@@ -472,8 +474,8 @@ def ab_performance_test(
472474

473475
if args.command == "run":
474476
ab_performance_test(
475-
args.a_revision,
476-
args.b_revision,
477+
args.binaries_a,
478+
args.binaries_b,
477479
args.pytest_opts,
478480
args.significance,
479481
args.absolute_strength,

0 commit comments

Comments
 (0)