Skip to content

Commit 972d5d7

Browse files
committed
Update qemu test runner to fulfill bazel's interface for test sharding
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
1 parent 7a36bf9 commit 972d5d7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

bazel/test_runners/qemu_with_kernel/launcher.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ RUN_QEMU_SCRIPT=%runqemuscript%
2525
# Create a tmp directory that serves as the /test_fs sanbox dir inside qemu.
2626
tmpdir_for_sandbox=$(mktemp -d)
2727

28+
# This file must be modified to signal to bazel that the qemu runner supports sharding.
29+
# Since this runner leverages bazel's test runner and only runs supported binaries
30+
# (googletest tests), we fulfill the requirement by touching this file.
31+
if [ -n "${TEST_SHARD_STATUS_FILE}" ]; then
32+
touch "${TEST_SHARD_STATUS_FILE}"
33+
fi
34+
2835
# shellcheck disable=SC2317
2936
function cleanup {
3037
retval=$?

0 commit comments

Comments
 (0)