Skip to content

Commit

Permalink
Meta: Use absolute paths in Meta/analyze-qemu-coverage.sh
Browse files Browse the repository at this point in the history
This is a bit easier to read in the output when running locally, and a
bit better script hygiene overall.
  • Loading branch information
ADKaster authored and linusg committed Dec 10, 2022
1 parent 8356677 commit 0e90b09
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Meta/analyze-qemu-coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
set -eo pipefail

SCRIPT_DIR="$(dirname "${0}")"
SERENITY_ROOT="$(realpath "${SCRIPT_DIR}"/..)"

if [ -z "$SERENITY_ARCH" ]; then
SERENITY_ARCH="x86_64"
Expand All @@ -13,7 +14,7 @@ if [ "$SERENITY_TOOLCHAIN" = "Clang" ]; then
toolchain_suffix="clang"
fi

BUILD_DIR="${SCRIPT_DIR}/../Build/${SERENITY_ARCH}${toolchain_suffix}"
BUILD_DIR="${SERENITY_ROOT}/Build/${SERENITY_ARCH}${toolchain_suffix}"
TEMP_PROFDATA="$BUILD_DIR/tmp_profile_data"

mkdir -p "$TEMP_PROFDATA"
Expand Down Expand Up @@ -62,12 +63,12 @@ if [ ! -f "$COVERAGE_PREPARE" ]; then
fi
fi

CLANG_BINDIR="${SCRIPT_DIR}/../Toolchain/Local/clang/bin"
CLANG_BINDIR="${SERENITY_ROOT}/Toolchain/Local/clang/bin"

# shellcheck disable=SC2128,SC2086 # all_binaries variable needs expanded to space separated string, not newline separated string
python3 "$COVERAGE_PREPARE" \
--unified-report \
-C "$SCRIPT_DIR/.." \
-C "${SERENITY_ROOT}" \
"$CLANG_BINDIR/llvm-profdata" "$CLANG_BINDIR/llvm-cov" \
"$TEMP_PROFDATA/" \
"$BUILD_DIR/reports/" \
Expand Down

0 comments on commit 0e90b09

Please sign in to comment.