Skip to content

Commit bc7b739

Browse files
committed
[PLUTO-1411] debug
1 parent 1e2965a commit bc7b739

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

run-tool-tests.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ cd "$TOOL_DIR"
3636
# Convert absolute paths to relative paths in the output
3737
# Handle both path formats: with and without extra codacy-cli-v2
3838
sed -i 's|file:///home/runner/work/codacy-cli-v2/|file:///|g' actual.sarif
39+
sed -i 's|file:///Users/runner/work/codacy-cli-v2/|file:///|g' actual.sarif
3940

4041
# Debug information
4142
echo "Current directory: $(pwd)"
@@ -46,6 +47,12 @@ ls -la "$EXPECTED_SARIF" || echo "File not found or not accessible"
4647
jq --sort-keys 'if .runs[0].tool.driver.rules == null then . else .runs[0].tool.driver.rules |= sort_by(.id) end' "$EXPECTED_SARIF" > expected.sorted.json
4748
jq --sort-keys 'if .runs[0].tool.driver.rules == null then . else .runs[0].tool.driver.rules |= sort_by(.id) end' actual.sarif > actual.sorted.json
4849

50+
# Normalize paths in both files
51+
sed -i 's|"/home/runner/work/codacy-cli-v2/|"/|g' expected.sorted.json
52+
sed -i 's|"/Users/runner/work/codacy-cli-v2/|"/|g' expected.sorted.json
53+
sed -i 's|"/home/runner/work/codacy-cli-v2/|"/|g' actual.sorted.json
54+
sed -i 's|"/Users/runner/work/codacy-cli-v2/|"/|g' actual.sorted.json
55+
4956
# Run diff and capture its exit code
5057
if ! diff expected.sorted.json actual.sorted.json; then
5158
echo "❌ Test output does not match expected output for $TOOL_NAME"

0 commit comments

Comments
 (0)