1
hermetic_cc_toolchain/ci/test
Motiejus Jakštys 5871171549 run bazel test
This simplifies the tests somewhat.
2022-02-04 10:07:34 +02:00

37 lines
910 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
cd "$(dirname "$0")/.."
. .envrc
_run() {
>&2 echo
>&2 echo " $*"
>&2 echo
"$@"
}
while read -r action platform toolchain run_under; do
args=("$@")
if [[ $run_under != : ]]; then
args+=(--run_under="$run_under")
fi
args+=(--platforms "@zig_sdk//:${platform}_platform")
args+=(--extra_toolchains "@zig_sdk//:${toolchain}_toolchain")
args+=(//test/...)
_run bazel "$action" "${args[@]}"
done <<EOF
test linux_amd64 linux_amd64_gnu.2.19 :
test linux_amd64 linux_amd64_musl :
build linux_arm64 linux_arm64_musl :
build linux_arm64 linux_arm64_gnu.2.28 :
build darwin_amd64 darwin_amd64 :
EOF
# TODO:
# works locally, fails on srht:
# test linux_arm64 linux_arm64_musl qemu-aarch64
#
# fails locally, qemu-aarch64 can't find the files in /usr
# test linux_arm64 linux_arm64_gnu.2.28 qemu-aarch64 -L /usr/aarch64-linux-gnu