Last active
July 28, 2016 00:09
-
-
Save mattak/c8812160e0ed9ed7d1d907636ab30783 to your computer and use it in GitHub Desktop.
Unity test runner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CMD=/Applications/Unity/Unity.app/Contents/MacOS/Unity | |
LOG=/tmp/unity.log | |
PROJECT_DIR=`pwd` | |
$CMD \ | |
-batchmode \ | |
-logfile $LOG \ | |
-projectPath $PROJECT_DIR \ | |
-runEditorTests | |
RESULT=$? | |
if [ $RESULT -ne 0 ]; then | |
cat $LOG | |
fi | |
if [ $RESULT -eq 0 ]; then | |
echo "π run succeeded. test passed." | |
elif [ $RESULT -eq 2 ]; then | |
echo "π run succeeded. test failed." | |
else | |
echo "π run failure." | |
fi | |
exit $RESULT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment