Skip to content

Commit 5571e4e

Browse files
committed
check-branch.sh: support any project with Makefile
This assumes the Makefile has a 'test' target.
1 parent 7b53900 commit 5571e4e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

check-branch.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,15 @@ do
2424
prefix="$(printf %04d $count)"
2525
filename="tmp/$prefix-$commit"
2626
start=$(date +%s)
27-
mvn clean verify > "$filename" 2>&1 && result=SUCCESS || result=FAILURE
27+
if [ -f Makefile ]
28+
then
29+
make test > "$filename" 2>&1 && result=SUCCESS || result=FAILURE
30+
elif [ -f pom.xml ]
31+
then
32+
mvn clean verify > "$filename" 2>&1 && result=SUCCESS || result=FAILURE
33+
else
34+
result=SKIPPED
35+
fi
2836
end=$(date +%s)
2937
time=$(expr "$end" - "$start")
3038
echo "$prefix $commit $result $time"

0 commit comments

Comments
 (0)