Skip to content

Commit 6d6caf4

Browse files
committed
fix(ab): fix shared build location
In 0c55e10 we introduced shared builds but that change was not effective until 467c90d at which point it broke AB tests. Fix commands so that AB tests work again. Fixes: 0c55e10 Signed-off-by: Pablo Barbáchano <[email protected]>
1 parent be71b9d commit 6d6caf4

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.buildkite/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def shared_build():
202202
]
203203
revision_b = os.environ.get("REVISION_B")
204204
if revision_b is not None:
205-
build_cmds.append(f"ln -svfT . build/{revision_b}")
205+
build_cmds.append(f"ln -svfT .. build/{revision_b}")
206206
binary_dir = f"build_$(uname -m)_{random_str(k=8)}.tar.gz"
207207
build_cmds += [
208208
"du -sh build/*",

tools/ab_test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@ def load_data_series(report_path: Path, revision: str = None, *, reemit: bool =
158158

159159
def collect_data(binary_dir: Path, tests: list[str]):
160160
"""Executes the specified test using the provided firecracker binaries"""
161-
revision = binary_dir.name
161+
# Example binary_dir: ../build/main/build/cargo_target/x86_64-unknown-linux-musl/release
162+
revision = binary_dir.parents[3].name
162163

163164
print(f"Collecting samples with {binary_dir}")
164165
subprocess.run(
@@ -323,7 +324,7 @@ def ab_performance_test(
323324
print(commit_list.strip())
324325

325326
def test_runner(workspace, _is_ab: bool):
326-
bin_dir = ".." / get_binary("firecracker", workspace_dir=workspace).parent
327+
bin_dir = get_binary("firecracker", workspace_dir=workspace).parent
327328
return collect_data(bin_dir, tests)
328329

329330
return git_ab_test(

0 commit comments

Comments
 (0)