-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-plugin.sh
More file actions
executable file
·35 lines (31 loc) · 1.05 KB
/
test-plugin.sh
File metadata and controls
executable file
·35 lines (31 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
# Convenience script for testing the CapsLock Maven plugin with examples
# Check for --rta flag anywhere in arguments
USE_RTA=""
ARGS=()
for arg in "$@"; do
if [ "$arg" = "--rta" ]; then
USE_RTA="-Dcapslock.useRTA=true"
else
ARGS+=("$arg")
fi
done
# Get the first non-flag argument as the test target
TARGET="${ARGS[0]}"
if [ "$TARGET" = "quick" ]; then
echo "Running quick-test only..."
mvn clean verify -pl maven-plugin -Dinvoker.test=quick-test $USE_RTA
elif [ "$TARGET" = "compress" ]; then
echo "Running compress-test only..."
mvn clean verify -pl maven-plugin -Dinvoker.test=compress-test $USE_RTA
elif [ "$TARGET" = "all" ] || [ -z "$TARGET" ]; then
echo "Running all examples..."
mvn clean verify -pl maven-plugin $USE_RTA
else
echo "Usage: $0 [quick|compress|all] [--rta]"
echo " quick - Run only quick-test"
echo " compress - Run only compress-test"
echo " all - Run all examples (default)"
echo " --rta - Use RTA instead of CHA for call graph analysis"
exit 1
fi