Skip to content

Commit 9aa2e60

Browse files
author
Théo Penavaire
authored
Fix win dx11 smoke test (#3635)
* Bump testframework.build in smoke project's manifest to preview.13 * Duplicate utr call in build smoke test dx11 standalone * Add auto trigger on smoke test project
1 parent bd72108 commit 9aa2e60

21 files changed

+245
-228
lines changed

.yamato/_editor_priming.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ editor:priming:test_min_editor:Win:
3939
commands:
4040
- pip install unity-downloader-cli --user --upgrade --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade
4141
- python3 .yamato/script/editor_scripts/get_minimum_editor_version.py tmp_unity_revision.txt
42-
- unity-downloader-cli --source-file tmp_unity_revision.txt -c windows --wait --skip-download -c editor -c il2cpp > unity_revision.txt
42+
- unity-downloader-cli --source-file tmp_unity_revision.txt -o windows --wait --skip-download -c editor -c il2cpp > unity_revision.txt
4343
- rm tmp_unity_revision.txt
4444
artifacts:
4545
unity_revision.zip:
@@ -77,7 +77,7 @@ editor:priming:test_min_editor:OSX:
7777
commands:
7878
- pip install unity-downloader-cli --user --upgrade --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade
7979
- python3 .yamato/script/editor_scripts/get_minimum_editor_version.py tmp_unity_revision.txt
80-
- unity-downloader-cli --source-file tmp_unity_revision.txt -c macos --wait --skip-download -c editor -c il2cpp > unity_revision.txt
80+
- unity-downloader-cli --source-file tmp_unity_revision.txt -o macos --wait --skip-download -c editor -c il2cpp > unity_revision.txt
8181
- rm tmp_unity_revision.txt
8282
artifacts:
8383
unity_revision.zip:
@@ -115,7 +115,7 @@ editor:priming:test_min_editor:Linux:
115115
commands:
116116
- pip install unity-downloader-cli --user --upgrade --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade
117117
- python3 .yamato/script/editor_scripts/get_minimum_editor_version.py tmp_unity_revision.txt
118-
- unity-downloader-cli --source-file tmp_unity_revision.txt -c linux --wait --skip-download -c editor -c il2cpp > unity_revision.txt
118+
- unity-downloader-cli --source-file tmp_unity_revision.txt -o linux --wait --skip-download -c editor -c il2cpp > unity_revision.txt
119119
- rm tmp_unity_revision.txt
120120
artifacts:
121121
unity_revision.zip:
@@ -153,7 +153,7 @@ editor:priming:test_min_editor:Android:
153153
commands:
154154
- pip install unity-downloader-cli --user --upgrade --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade
155155
- python3 .yamato/script/editor_scripts/get_minimum_editor_version.py tmp_unity_revision.txt
156-
- unity-downloader-cli --source-file tmp_unity_revision.txt -c windows --wait --skip-download -c editor -c il2cpp -c android > unity_revision.txt
156+
- unity-downloader-cli --source-file tmp_unity_revision.txt -o windows --wait --skip-download -c editor -c il2cpp -c android > unity_revision.txt
157157
- rm tmp_unity_revision.txt
158158
artifacts:
159159
unity_revision.zip:
@@ -191,7 +191,7 @@ editor:priming:test_min_editor:iPhone:
191191
commands:
192192
- pip install unity-downloader-cli --user --upgrade --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade
193193
- python3 .yamato/script/editor_scripts/get_minimum_editor_version.py tmp_unity_revision.txt
194-
- unity-downloader-cli --source-file tmp_unity_revision.txt -c macos --wait --skip-download -c editor -c il2cpp -c ios > unity_revision.txt
194+
- unity-downloader-cli --source-file tmp_unity_revision.txt -o macos --wait --skip-download -c editor -c il2cpp -c ios > unity_revision.txt
195195
- rm tmp_unity_revision.txt
196196
artifacts:
197197
unity_revision.zip:

.yamato/all-smoke_test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ PR_Smoke_Test_trunk:
1616
rerun: on-new-revision
1717
- path: .yamato/smoke_test-win-dx11.yml#Smoke_Test_Win_DX11_Standalone_mono_Linear_trunk
1818
rerun: on-new-revision
19+
triggers:
20+
expression: pull_request.target eq "master" AND NOT pull_request.draft AND pull_request.changes.any match ["TestProjects/SRP_SmokeTest/**/*"] AND NOT pull_request.push.changes.all match ["*.md", "**/*.md", "doc/**/*", "**/Documentation*/**/*"]
1921
variables:
2022
UTR_VERSION: "current"
2123
TEST_FILTER: .*

.yamato/config/__shared.metafile

Lines changed: 44 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -63,43 +63,43 @@ test_platforms:
6363
- [OSX_OpenGlCore, OSX_Metal]: --platform=StandaloneOSX
6464
- [iPhone_Metal]: --platform=iOS
6565
- [Android_OpenGLES3, Android_Vulkan]: --platform=Android
66-
66+
6767
- [Android_OpenGLES3, Android_Vulkan, iPhone_Metal,Win_DX11, Win_DX12, Win_Vulkan, Win_, Linux_OpenGlCore, Linux_Vulkan]: --player-load-path=players
68-
68+
6969
- [all]: --artifacts_path=TestProjects/<PROJECT_FOLDER>/test-results
7070
- [OSX_Metal]: --artifacts_path=/Users/bokken/Graphics/TestProjects/<PROJECT_FOLDER>/test-results
71-
71+
7272
- [OSX_Metal]: --editor-location=.Editor
7373

7474
- [OSX_Metal]: --scripting-backend=<SCRIPTING_BACKEND>
75-
- [OSX_Metal]: --testfilter=%TEST_FILTER%
76-
75+
- [OSX_Metal]: --testfilter=%TEST_FILTER%
76+
7777
- [Android_OpenGLES3, Android_Vulkan]: --architecture=ARM64
7878
- [OSX_Metal]: --testproject=/Users/bokken/Graphics/TestProjects/<PROJECT_FOLDER>
79-
- [Win_DX11, Win_DX12, Win_Vulkan, Win_, Linux_OpenGlCore, Linux_Vulkan]: --player-connection-ip=auto
79+
- [Win_DX11, Win_DX12, Win_Vulkan, Win_, Linux_OpenGlCore, Linux_Vulkan]: --player-connection-ip=auto
8080

8181
utr_flags_build:
82-
- [all]: --testfilter=%TEST_FILTER%
82+
- [all]: --testfilter=%TEST_FILTER%
8383
- [all]: --suite=playmode
8484
- [all]: --build-only
8585
- [all]: --scripting-backend=<SCRIPTING_BACKEND>
86-
- [all]: --extra-editor-arg="-colorspace=<COLORSPACE>"
87-
86+
- [all]: --extra-editor-arg="-colorspace=<COLORSPACE>"
87+
8888
- [Win_DX11, Win_DX12, Win_Vulkan, Win_]: --platform=StandaloneWindows64
8989
- [Linux_OpenGlCore, Linux_Vulkan]: --platform=StandaloneLinux64
9090
- [OSX_OpenGlCore, OSX_Metal]: --platform=StandaloneOSX
9191
- [iPhone_Metal]: --platform=iOS
9292
- [Android_OpenGLES3, Android_Vulkan]: --platform=Android
93-
93+
9494
- [all]: --testproject=./TestProjects/<PROJECT_FOLDER>
95-
95+
9696
- [all]: --editor-location=.Editor
9797
- [Android_OpenGLES3, Android_Vulkan]: --editor-location=./WindowsEditor
98-
98+
9999
- [all]: --artifacts_path=TestProjects/<PROJECT_FOLDER>/test-results
100-
100+
101101
- [Android_OpenGLES3, Android_Vulkan, iPhone_Metal, Win_DX11, Win_DX12, Win_Vulkan, Win_, Linux_OpenGlCore, Linux_Vulkan]: --player-save-path=players
102-
102+
103103
- [all]: --timeout=1200
104104
- [Android_OpenGLES3, Android_Vulkan]: --timeout=2700
105105
- [iPhone]: --timeout=1800
@@ -110,13 +110,13 @@ test_platforms:
110110
- [Win_Vulkan, Linux_Vulkan, Android_Vulkan]: --extra-editor-arg="-executemethod" --extra-editor-arg="SetupProject.ApplySettings" --extra-editor-arg="vulkan" --extra-editor-arg="<COLORSPACE>"
111111
- [Android_OpenGLES3]: ---extra-editor-arg="-executemethod" --extra-editor-arg="SetupProject.ApplySettings" --extra-editor-arg="gles3" --extra-editor-arg="<COLORSPACE>"
112112
- [iPhone_Metal]: --extra-editor-arg="-executemethod" --extra-editor-arg="SetupProject.ApplySettings" --extra-editor-arg="metal" --extra-editor-arg="<COLORSPACE>"
113-
113+
114114
- [Win_DX11]: --extra-editor-arg="-playergraphicsapi=Direct3D11"
115115
- [Win_DX12]: --extra-editor-arg="-playergraphicsapi=Direct3D12"
116116
- [Win_Vulkan, Linux_Vulkan, Android_Vulkan]: --extra-editor-arg="-playergraphicsapi=Vulkan"
117117
- [Android_OpenGLES3]: --extra-editor-arg="-playergraphicsapi=OpenGLES3"
118118
- [iPhone_Metal]: --extra-editor-arg="-playergraphicsapi=Metal"
119-
119+
120120
- [Android_OpenGLES3, Android_Vulkan]: --architecture=ARM64
121121
commands:
122122
- [Android_OpenGLES3, Android_Vulkan]: <shared.platform.commands.connect_bokken>
@@ -132,20 +132,20 @@ test_platforms:
132132
- [all]: <shared.platform.commands.call_utr>
133133
- type: playmode
134134
utr_flags:
135-
- [all]: --testfilter=%TEST_FILTER%
135+
- [all]: --testfilter=%TEST_FILTER%
136136
- [all]: --zero-tests-are-ok=1
137137
- [all]: --suite=playmode
138-
- [all]: --scripting-backend=<SCRIPTING_BACKEND>
138+
- [all]: --scripting-backend=<SCRIPTING_BACKEND>
139139
# - [all]: --reruncount=2
140140
- [all]: --extra-editor-arg="-colorspace=<COLORSPACE>"
141-
141+
142142
- [all]: --testproject=./TestProjects/<PROJECT_FOLDER>
143143
- [OSX_Metal]: --testproject=/Users/bokken/Graphics/TestProjects/<PROJECT_FOLDER>
144144

145145
- [all]: --editor-location=.Editor
146146
- [Android_OpenGLES3, Android_Vulkan]: --editor-location=./WindowsEditor
147147
- [OSX_Metal]: --editor-location=/Users/bokken/.Editor
148-
148+
149149
- [all]: --artifacts_path=TestProjects/<PROJECT_FOLDER>/test-results
150150
- [OSX_Metal]: --artifacts_path=/Users/bokken/Graphics/TestProjects/<PROJECT_FOLDER>/test-results
151151

@@ -158,26 +158,26 @@ test_platforms:
158158
- [all]: <shared.platform.commands.setup_utr>
159159
- [all]: <shared.platform.commands.unity_downloader_cli>
160160
- [all]: <shared.platform.commands.call_utr>
161-
161+
162162
- type: editmode
163163
utr_flags:
164-
- [all]: --testfilter=%TEST_FILTER%
164+
- [all]: --testfilter=%TEST_FILTER%
165165
- [all]: --zero-tests-are-ok=1
166166
- [all]: --suite=editor
167167
# - [all]: --reruncount=2
168-
- [all]: --scripting-backend=<SCRIPTING_BACKEND>
168+
- [all]: --scripting-backend=<SCRIPTING_BACKEND>
169169
- [all]: --platform=editmode
170170
- [all]: --extra-editor-arg="-colorspace=<COLORSPACE>"
171171
- [Android_OpenGLES3, Android_Vulkan]: --platform=Android
172172
- [iPhone_Metal]: --platform=iOS
173-
173+
174174
- [all]: --testproject=./TestProjects/<PROJECT_FOLDER>
175175
- [OSX_Metal]: --testproject=/Users/bokken/Graphics/TestProjects/<PROJECT_FOLDER>
176176

177177
- [all]: --editor-location=.Editor
178178
- [Android_OpenGLES3, Android_Vulkan]: --editor-location=./WindowsEditor
179179
- [OSX_Metal]: --editor-location=Users/bokken/.Editor
180-
180+
181181
- [all]: --artifacts_path=TestProjects/<PROJECT_FOLDER>/test-results
182182
- [OSX_Metal]: --artifacts_path=/Users/bokken/Graphics/TestProjects/<PROJECT_FOLDER>/test-results
183183

@@ -236,12 +236,19 @@ platforms:
236236
utr <UTR_FLAGS>
237237
call_utr_without_git:
238238
- utr <UTR_FLAGS>
239-
unity_downloader_cli:
239+
call_utr_and_exit_0:
240+
- |5-
241+
git rev-parse HEAD | git show -s --format=%%cI > revdate.tmp
242+
set /p GIT_REVISIONDATE=<revdate.tmp
243+
echo %GIT_REVISIONDATE%
244+
del revdate.tmp
245+
utr <UTR_FLAGS> & exit 0
246+
unity_downloader_cli:
240247
- choco install unity-downloader-cli -y -s https://artifactory.prd.it.unity3d.com/artifactory/api/nuget/unity-choco-local
241248
- unity-downloader-cli <EDITOR_REVISION_CMD> -c editor -c il2cpp --wait --published-only
242-
turn_off_firewall:
249+
turn_off_firewall:
243250
- NetSh Advfirewall set allprofiles state off
244-
251+
245252
OSX:
246253
name: OSX
247254
os: macos
@@ -266,22 +273,22 @@ platforms:
266273
editorpath: "$(pwd)/.Editor/Unity.app/Contents/MacOS/Unity"
267274
commands:
268275
[Metal]:
269-
setup_utr:
276+
setup_utr:
270277
- curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr
271278
- chmod +x utr
272279
- scp -i ~/.ssh/id_rsa_macmini -r $YAMATO_SOURCE_DIR bokken@$BOKKEN_DEVICE_IP:~/Graphics
273280
- scp -i ~/.ssh/id_rsa_macmini ~/.ssh/id_rsa_macmini bokken@$BOKKEN_DEVICE_IP:~/.ssh/id_rsa_macmini
274281
call_utr: # TODO add git commands when needed
275282
- |5-
276283
ssh -i ~/.ssh/id_rsa_macmini bokken@$BOKKEN_DEVICE_IP "export UPM_REGISTRY=https://artifactory-slo.bf.unity3d.com/artifactory/api/npm/upm-candidates; ~/Graphics/utr <UTR_FLAGS> "
277-
UTR_RESULT=$?
284+
UTR_RESULT=$?
278285
mkdir -p TestProjects/<PROJECT_FOLDER>/test-results/
279286
scp -i ~/.ssh/id_rsa_macmini -r bokken@$BOKKEN_DEVICE_IP:/Users/bokken/Graphics/TestProjects/<PROJECT_FOLDER>/test-results/ TestProjects/<PROJECT_FOLDER>/test-results/
280287
exit $UTR_RESULT
281288
call_utr_without_git:
282289
- |5-
283290
ssh -i ~/.ssh/id_rsa_macmini bokken@$BOKKEN_DEVICE_IP "export UPM_REGISTRY=https://artifactory-slo.bf.unity3d.com/artifactory/api/npm/upm-candidates; ~/Graphics/utr <UTR_FLAGS> "
284-
UTR_RESULT=$?
291+
UTR_RESULT=$?
285292
mkdir -p TestProjects/<PROJECT_FOLDER>/test-results/
286293
scp -i ~/.ssh/id_rsa_macmini -r bokken@$BOKKEN_DEVICE_IP:/Users/bokken/Graphics/TestProjects/<PROJECT_FOLDER>/test-results/ TestProjects/<PROJECT_FOLDER>/test-results/
287294
exit $UTR_RESULT
@@ -323,20 +330,20 @@ platforms:
323330
flavor: b1.xlarge
324331
commands:
325332
[OpenGlCore, Vulkan]:
326-
setup_utr:
333+
setup_utr:
327334
- curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr
328335
- chmod +x utr
329336
call_utr:
330337
- DISPLAY=:0.0 ./utr <UTR_FLAGS> # TODO include git commands when needed
331338
call_utr_without_git:
332339
- DISPLAY=:0.0 ./utr <UTR_FLAGS>
333-
unity_downloader_cli:
340+
unity_downloader_cli:
334341
- curl -L https://artifactory.prd.it.unity3d.com/artifactory/api/gpg/key/public | sudo apt-key add -
335342
- sudo sh -c "echo 'deb https://artifactory.prd.it.unity3d.com/artifactory/unity-apt-local bionic main' > /etc/apt/sources.list.d/unity.list"
336343
- sudo apt update
337344
- sudo apt install unity-downloader-cli
338345
- sudo unity-downloader-cli <EDITOR_REVISION_CMD> -c editor -c il2cpp --wait --published-only
339-
346+
340347

341348
Android:
342349
name: Android
@@ -356,7 +363,7 @@ platforms:
356363
flavor: b1.large
357364
commands:
358365
[OpenGLES3, Vulkan]:
359-
setup_utr:
366+
setup_utr:
360367
- curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr.bat --output utr.bat
361368
call_utr:
362369
- |5-
@@ -371,12 +378,12 @@ platforms:
371378
unity_downloader_cli:
372379
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade
373380
- unity-downloader-cli <EDITOR_REVISION_CMD> -p WindowsEditor -c editor -c il2cpp -c android --wait --published-only
374-
turn_off_firewall:
381+
turn_off_firewall:
375382
- NetSh Advfirewall set allprofiles state off
376383
connect_bokken:
377384
- '%ANDROID_SDK_ROOT%\platform-tools\adb.exe connect %BOKKEN_DEVICE_IP%'
378385
- powershell %ANDROID_SDK_ROOT%\platform-tools\adb.exe devices
379-
kill_server:
386+
kill_server:
380387
- start %ANDROID_SDK_ROOT%\platform-tools\adb.exe kill-server
381388

382389
iPhone:

.yamato/config/smoke_test.metafile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ test_platforms:
55
- type: playmode
66
- type: editmode
77
- type: Standalone
8+
commands_build:
9+
- [all]: <shared.platform.commands.turn_off_firewall>
10+
- [all]: <shared.platform.commands.setup_utr>
11+
- [all]: <shared.platform.commands.unity_downloader_cli>
12+
- [Win_DX11, Win_DX12]: <shared.platform.commands.call_utr_and_exit_0>
13+
- [all]: <shared.platform.commands.call_utr_without_git>
814
platforms:
915
- name: Win
1016
apis:
@@ -13,8 +19,8 @@ platforms:
1319
- name: mono
1420
color_spaces:
1521
- Linear
16-
expression_trigger:
17-
expression: ""
22+
expression_trigger:
23+
expression: 'pull_request.target eq "<TARGET_BRANCH>" AND NOT pull_request.draft AND pull_request.changes.any match ["TestProjects/SRP_SmokeTest/**/*"] AND NOT pull_request.push.changes.all match ["*.md", "**/*.md", "doc/**/*", "**/Documentation*/**/*"]'
1824
pr:
1925
dependencies:
2026
- platform: Win
@@ -28,4 +34,4 @@ pr:
2834
nightly:
2935
dependencies:
3036
- project: Smoke_Test
31-
pr: true
37+
pr: true

0 commit comments

Comments
 (0)