Skip to content

Commit 1e2965a

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

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

run-tool-tests.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ TOOL_NAME=$1
1010
TOOL_DIR="plugins/tools/$TOOL_NAME/test/src"
1111
TEST_DIR="plugins/tools/$TOOL_NAME/test"
1212
CLI_PATH="$(pwd)/cli-v2"
13+
EXPECTED_SARIF="$(pwd)/$TEST_DIR/expected.sarif"
1314

1415
# Check if tool directory exists
1516
if [ ! -d "$TOOL_DIR" ]; then
@@ -38,11 +39,11 @@ sed -i 's|file:///home/runner/work/codacy-cli-v2/|file:///|g' actual.sarif
3839

3940
# Debug information
4041
echo "Current directory: $(pwd)"
41-
echo "Looking for expected.sarif in: $TEST_DIR/expected.sarif"
42-
ls -la "$TEST_DIR/expected.sarif" || echo "File not found or not accessible"
42+
echo "Looking for expected.sarif in: $EXPECTED_SARIF"
43+
ls -la "$EXPECTED_SARIF" || echo "File not found or not accessible"
4344

4445
# Sort all fields in both files, handling null rules array
45-
jq --sort-keys 'if .runs[0].tool.driver.rules == null then . else .runs[0].tool.driver.rules |= sort_by(.id) end' "$TEST_DIR/expected.sarif" > expected.sorted.json
46+
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
4647
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
4748

4849
# Run diff and capture its exit code

0 commit comments

Comments
 (0)