|
1 | 1 | #! /bin/sh |
2 | | -project="unity-sdk-travis" |
3 | 2 |
|
4 | | -if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then |
5 | | - echo '$TRAVIS_PULL_REQUEST is false, running tests' |
6 | | - echo "Attempting to create Streaming Assets directory..." |
7 | | - mkdir -p Travis/UnityTestProject/Assets/StreamingAssets/ |
8 | | - if [ $? = 0 ] ; then |
9 | | - echo "Creating StreamingAssets directory COMPLETED! Exited with $?" |
10 | | - echo "Attempting to decrypt config..." |
11 | | - openssl aes-256-cbc -K $encrypted_984f19857b4c_key -iv $encrypted_984f19857b4c_iv -in Config.json.enc -out Travis/UnityTestProject/Assets/StreamingAssets/Config.json -d |
12 | | - if [ $? = 0 ] ; then |
13 | | - echo "Decrypting config COMPLETED! Exited with $?" |
14 | | - else |
15 | | - echo "Decrypting config FAILED! Exited with $?" |
16 | | - exit 1 |
17 | | - fi |
18 | | - else |
19 | | - echo "Creating StreamingAssets directory FAILED! Exited with $?" |
20 | | - exit 1 |
21 | | - fi |
| 3 | +set -e |
22 | 4 |
|
23 | | - echo "Attempting to run UnitySDK integration Tests..." |
24 | | - /Applications/Unity/Unity.app/Contents/MacOS/Unity \ |
25 | | - -batchmode \ |
26 | | - -nographics \ |
27 | | - -silent-crashes \ |
28 | | - -logFile $(pwd)/integrationTests.log \ |
29 | | - -projectPath $(pwd)/Travis/UnityTestProject \ |
30 | | - -executemethod IBM.Watson.DeveloperCloud.Editor.TravisIntegrationTests.RunTests \ |
31 | | - -quit |
32 | | - if [ $? = 0 ] ; then |
33 | | - echo "UnitTest COMPLETED! Exited with $?" |
34 | | - exit 0 |
35 | | - else |
36 | | - echo "UnitTest FAILED! Exited with $?" |
37 | | - echo 'Logs tests' |
38 | | - cat $(pwd)/integrationTests.log |
39 | | - exit 1 |
40 | | - fi |
| 5 | +# if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then |
| 6 | +# echo '$TRAVIS_PULL_REQUEST is false, running tests' |
| 7 | +echo "Attempting to create Streaming Assets directory..." |
| 8 | +mkdir -p Travis/UnityTestProject/Assets/StreamingAssets/ |
| 9 | + |
| 10 | +echo "Attempting to decrypt config..." |
| 11 | +openssl aes-256-cbc -K $encrypted_984f19857b4c_key -iv $encrypted_984f19857b4c_iv -in Config.json.enc -out Travis/UnityTestProject/Assets/StreamingAssets/Config.json -d |
| 12 | + |
| 13 | +echo "Attempting to run UnitySDK integration Tests..." |
| 14 | +/Applications/Unity/Unity.app/Contents/MacOS/Unity \ |
| 15 | + -batchmode \ |
| 16 | + -nographics \ |
| 17 | + -silent-crashes \ |
| 18 | + -logFile $(pwd)/integrationTests.log \ |
| 19 | + -projectPath $(pwd)/Travis/UnityTestProject \ |
| 20 | + -executemethod IBM.Watson.DeveloperCloud.Editor.TravisIntegrationTests.RunTests \ |
| 21 | + -quit |
| 22 | +if [ $? = 0 ] ; then |
| 23 | + echo "UnitTest COMPLETED! Exited with $?" |
| 24 | + exit 0 |
41 | 25 | else |
42 | | - echo '$TRAVIS_PULL_REQUEST is not false ($TRAVIS_PULL_REQUEST), skipping tests' |
| 26 | + echo "UnitTest FAILED! Exited with $?" |
| 27 | + echo 'Logs tests' |
| 28 | + cat $(pwd)/integrationTests.log |
| 29 | + exit 1 |
43 | 30 | fi |
| 31 | +# else |
| 32 | +# echo '$TRAVIS_PULL_REQUEST is not false ($TRAVIS_PULL_REQUEST), skipping tests' |
| 33 | +# fi |
0 commit comments