6
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Unity (Mac) でEditorTestをcommand lineから走らせる

6
Last updated at Posted at 2016-07-28

Jenkinsのタスク登録した際のメモ

やりかた

/Applications/Unity/Unity.app/Contents/MacOS/Unity \
  -batchmode \
  -logfile /tmp/unity.log \
  -projectPath `pwd` \
  -runEditorTests

こんな感じで実行するだけ。

スクリプト

もうちょっと便利にログ出したり、見やすくしてJenkinsから走らせている

# !/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
6
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?