ring/mk/runner
Brian Smith af08a2fff9 CI/CD: Add aarch64-unknown-linux-gnu test code coverage.
aarch64-unknown-linux-musl doesn't have profiler_builtins enabled so
use aarch64-unknown-linux-gnu instead.

Work around an issue where the "%m" feature of the LLVM source-based code
coverage doesn't work within QEMU.
2020-11-25 16:29:43 -08:00

22 lines
542 B
Bash
Executable File

#!/bin/bash
set -eux -o pipefail
IFS=$'\n\t'
for arg in $*; do
# There can be some arguments prefixed in front of the executable, e.g.
# when qemu-user is used. There can be arguments after the executable,
# e.g. `cargo test` arguments like `TESTNAME`.
if [[ $arg = */deps/* ]]; then
executable=$arg
break
fi
done
export LLVM_PROFILE_FILE=$(dirname "$RING_BUILD_EXECUTABLE_LIST")/$(basename "$executable").profraw
if [ -n "$RING_BUILD_EXECUTABLE_LIST" ]; then
echo "$executable" >> "$RING_BUILD_EXECUTABLE_LIST"
fi
$*