Skip to content

Commit f7bceb6

Browse files
roypatbchalios
authored andcommitted
devtool: Build A and B binaries if $do_build is true
If `cmd_test` is instructed to build its own binaries (e.g. being ran outside of CI), and the environment specifies that A/B-tests should be ran, then we not only need to build the currently checked out commit (the "B" revision), but also an "A" binary based on the value of the `BUILDKITE_PULL_REQUEST_BASE_BRANCH` environment variable. Signed-off-by: Patrick Roy <[email protected]>
1 parent 94826a8 commit f7bceb6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tools/devtool

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,12 @@ cmd_test() {
722722
ensure_devctr
723723
ensure_build_dir
724724
ensure_ci_artifacts
725-
[ $do_build != 0 ] && cmd_build --release
725+
if [ $do_build != 0 ]; then
726+
cmd_build --release
727+
if [ -n "$BUILDKITE_PULL_REQUEST_BASE_BRANCH" ]; then
728+
cmd_build --release --rev "$BUILDKITE_PULL_REQUEST_BASE_BRANCH"
729+
fi
730+
fi
726731

727732
apply_linux_61_tweaks
728733

0 commit comments

Comments
 (0)