Skip to content

Commit bdb7ac0

Browse files
committed
[PLUTO-1411] Add script
1 parent 7076492 commit bdb7ac0

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

run-tool-tests.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,28 @@ fi
88

99
TOOL_NAME=$1
1010
TOOL_DIR="plugins/tools/$TOOL_NAME/test/src"
11+
CLI_PATH="$(pwd)/cli-v2"
1112

1213
# Check if tool directory exists
1314
if [ ! -d "$TOOL_DIR" ]; then
1415
echo "Error: Tool directory $TOOL_DIR does not exist"
1516
exit 1
1617
fi
1718

19+
# Check if CLI binary exists
20+
if [ ! -f "$CLI_PATH" ]; then
21+
echo "Error: CLI binary not found at $CLI_PATH"
22+
exit 1
23+
fi
24+
1825
# Change to the tool's test directory
1926
cd "$TOOL_DIR"
2027

2128
# Install the tool
22-
codacy-cli install
29+
"$CLI_PATH" install
2330

2431
# Run analysis
25-
codacy-cli analyze --tool $TOOL_NAME --format sarif --output actual.sarif
32+
"$CLI_PATH" analyze --tool $TOOL_NAME --format sarif --output actual.sarif
2633

2734
# Convert absolute paths to relative paths in the output
2835
sed -i 's|file:///home/runner/work/codacy-cli-v2/codacy-cli-v2/|file:///|g' actual.sarif

0 commit comments

Comments
 (0)