Skip to content

Instantly share code, notes, and snippets.

@mattak
Last active July 28, 2016 00:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattak/c8812160e0ed9ed7d1d907636ab30783 to your computer and use it in GitHub Desktop.
Save mattak/c8812160e0ed9ed7d1d907636ab30783 to your computer and use it in GitHub Desktop.
Unity test runner
#!/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