Skip to content

Commit

Permalink
Fix coverage reporting
Browse files Browse the repository at this point in the history
Signed-off-by: Henrik Panhans <[email protected]>
  • Loading branch information
henrik-dmg committed Apr 22, 2024
1 parent eaa6495 commit dcd0ca4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Scripts/convert-coverage-report
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ if [ -z "$TARGET" ]; then
fi

INSTR_PROFILE=$(find $BUILD_PATH -name "*.profdata")
TARGET_PATH=$(find $BUILD_PATH -name "$TARGET" | tail -n1)
TARGET_PATH=$(find $BUILD_PATH -name "$TARGET" | head -1)
if [ -f $TARGET_PATH ]; then
OBJECT_FILE="$TARGET_PATH"
else
TARGET=$(echo $TARGET | sed 's/\.[^.]*$//')
OBJECT_FILE=$(find $BUILD_PATH -name "$TARGET" | tail -n1)
OBJECT_FILE=$(find $BUILD_PATH -name "$TARGET" | head -1)
fi

mkdir -p $(dirname "$OUTPUT_FILE")
Expand All @@ -45,7 +45,6 @@ xcrun llvm-cov report \
"$OBJECT_FILE" \
--instr-profile=$INSTR_PROFILE \
--ignore-filename-regex=$IGNORE_FILENAME_REGEX \
--use-color

# Export to code coverage file
xcrun llvm-cov export \
Expand Down

0 comments on commit dcd0ca4

Please sign in to comment.