Skip to content

Commit db030f4

Browse files
committed
merge in develop
2 parents 03fe899 + a16822d commit db030f4

File tree

2 files changed

+41
-40
lines changed

2 files changed

+41
-40
lines changed

Scenes/UnitTests/Scripts/MainUI.cs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,16 @@ private static void UpdateNames(UnityEditor.MenuCommand command)
103103
}
104104
#endif
105105

106+
private void OnEnable()
107+
{
108+
SceneManager.sceneLoaded += SceneManager_sceneLoaded;
109+
}
110+
111+
private void OnDisable()
112+
{
113+
SceneManager.sceneLoaded -= SceneManager_sceneLoaded;
114+
}
115+
106116
private IEnumerator Start()
107117
{
108118
if (m_BackgroundUI == null)
@@ -141,11 +151,12 @@ private IEnumerator Start()
141151

142152
// create the buttons..
143153
UpdateButtons();
154+
144155
}
145156

146-
private void OnLevelWasLoaded(int level)
157+
void SceneManager_sceneLoaded (Scene arg0, LoadSceneMode arg1)
147158
{
148-
UpdateButtons();
159+
UpdateButtons();
149160
}
150161

151162
private void UpdateButtons()

Travis/runTests.sh

Lines changed: 28 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,33 @@
11
#! /bin/sh
2-
project="unity-sdk-travis"
32

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
224

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
4125
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
4330
fi
31+
# else
32+
# echo '$TRAVIS_PULL_REQUEST is not false ($TRAVIS_PULL_REQUEST), skipping tests'
33+
# fi

0 commit comments

Comments
 (0)