Last active
February 27, 2019 18:21
-
-
Save Geri-Borbas/ad4fb8d64bdcb0c50a6abea57716823e to your computer and use it in GitHub Desktop.
Run Unity Editor Tests from command line. See https://gist.github.com/eppz/e566781bb20abf6df09469515d07ae83 for tasks.json. Don't forget to make it executable using chmod +x.
This file contains 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/sh | |
UNITY_EXECUTABLE="/Applications/Unity/Unity.app/Contents/MacOS/Unity" | |
PROJECT_FOLDER="$1" | |
RESULTS_FILENAME="$2" | |
RESULTS_FILEPATH="$PROJECT_FOLDER/$RESULTS_FILENAME" | |
echo "Testing Unity project: $PROJECT_FOLDER" | |
echo "Running Unity.app (batch mode, run tests)..." | |
time \ | |
"$UNITY_EXECUTABLE" \ | |
-projectPath "$PROJECT_FOLDER" \ | |
-batchmode \ | |
-runEditorTests \ | |
-editorTestsResultFile "$RESULTS_FILEPATH" \ | |
-nographics | |
echo "" | |
echo "Editor log: ~/Library/Logs/Unity/Editor.log" | |
echo "Results xml: $RESULTS_FILEPATH" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment