Skip to content

Instantly share code, notes, and snippets.

@cherniag
Created October 2, 2017 12:19
Show Gist options
  • Save cherniag/f05184767f594854d6ed1572583fb3c3 to your computer and use it in GitHub Desktop.
Save cherniag/f05184767f594854d6ed1572583fb3c3 to your computer and use it in GitHub Desktop.
bash script - loop maven tests
COUNTER=0
while [ $COUNTER -lt 100 ]; do
echo The counter is $COUNTER
mvn clean test -f <path>/pom.xml > maven.log
rc=$?
if [[ $rc -ne 0 ]] ; then
echo 'Could not perform tests'; exit $rc
fi
let COUNTER=COUNTER+1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment