Skip to content

Commit 1b49fef

Browse files
authored
FIX: Test instabilities in CI (#2190)
1 parent 757e7b5 commit 1b49fef

File tree

2 files changed

+10
-21
lines changed

2 files changed

+10
-21
lines changed

.yamato/config.metadata

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ editors:
66
run_tvos: false
77
- version: 6000.1
88
run_tvos: false
9+
- version: 6000.2
10+
run_tvos: false
911
- version: trunk
1012
run_tvos: false
1113

.yamato/upm-ci.yml

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
variables:
1414
EDITOR_VERSION: {{ editor.version }}
1515
commands:
16-
- {{ utr_install_win }}
1716
- {{ upm_ci_install }}
1817
# Get version 2.3.0-preview of doctools package (it currently fails for 3.0.0-preview).
1918
# Automatically makes the documentation tests in APIVerification go live.
@@ -28,15 +27,14 @@
2827
- upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u %EDITOR_VERSION%
2928
{% if platform.name == "win" and category.name == "functional" %} --enable-code-coverage --code-coverage-options "generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem;pathReplacePatterns:@*,,Library/PackageCache,Packages" --extra-utr-arg="--coverage-results-path={{ yamato_source_dir_win }}/upm-ci~/test-results/CodeCoverage/Package --coverage-upload-options=\"reportsDir:upm-ci~/test-results/CodeCoverage/Package;name:{{platform.name}}_{{editor.version}}_pkg;flags:{{platform.name}}_{{editor.version}}_pkg\"" {% endif %}
3029
{% if platform.installscript %}
31-
- {{ unity_downloader_install }}
3230
- {{ platform.installscript }} %EDITOR_VERSION%
3331
{% endif %}
3432
# ADBv2 on 2019.4 causes the test runner to not start on initial import when the
3533
# samples are in the package. Move the samples back into the project.
3634
- move /Y .\Packages\com.unity.inputsystem\Samples .\Assets
3735
- move /Y .\Packages\com.unity.inputsystem\Samples.meta .\Assets
3836
# Now run our full test suite that sits in Assets/Tests by running UTR on our project.
39-
- ./utr --testproject . --timeout=1200 --editor-location=.Editor --artifacts_path=upm-ci~/test-results/isolation-com.unity.inputsystem.tests --suite=playmode {% if platform.name == "win" %} --suite=editor {% endif %} {% if category.name == "performance" %} --category=Performance {% else %} --category=!Performance {% endif %} --api-profile=NET_4_6 {% if platform.runtime %} --platform {{ platform.runtime }} {% endif %} {% if platform.scripting-backend %} --scripting-backend {{ platform.scripting-backend }} {% endif %} {% if category.name == "performance" %} --report-performance-data --performance-project-id=InputSystem {% endif %} {% if platform.name == "win" and category.name == "functional" %}--enable-code-coverage --coverage-options="generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem" --coverage-results-path={{ yamato_source_dir_win }}/upm-ci~/test-results/CodeCoverage/Project --coverage-upload-options="reportsDir:upm-ci~/test-results/CodeCoverage/Project;name:{{platform.name}}_{{editor.version}}_project;flags:{{platform.name}}_{{editor.version}}_project" {% endif %}
37+
- UnifiedTestRunner --testproject . --timeout=1200 --editor-location=.Editor --artifacts_path=upm-ci~/test-results/isolation-com.unity.inputsystem.tests --suite=playmode {% if platform.name == "win" %} --suite=editor {% endif %} {% if category.name == "performance" %} --category=Performance {% else %} --category=!Performance {% endif %} --api-profile=NET_4_6 {% if platform.runtime %} --platform {{ platform.runtime }} {% endif %} {% if platform.scripting-backend %} --scripting-backend {{ platform.scripting-backend }} {% endif %} {% if category.name == "performance" %} --report-performance-data --performance-project-id=InputSystem {% endif %} {% if platform.name == "win" and category.name == "functional" %}--enable-code-coverage --coverage-options="generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem" --coverage-results-path={{ yamato_source_dir_win }}/upm-ci~/test-results/CodeCoverage/Project --coverage-upload-options="reportsDir:upm-ci~/test-results/CodeCoverage/Project;name:{{platform.name}}_{{editor.version}}_project;flags:{{platform.name}}_{{editor.version}}_project" {% endif %}
4038
{% if platform.name == "win" and category.name == "functional" %}
4139
# Delete the Package and Project reports & raw coverage data, to keep Artifacts.zip smaller
4240
- rmdir /s/q "{{ yamato_source_dir_win }}/upm-ci~/test-results/CodeCoverage/Package"
@@ -68,7 +66,6 @@
6866
variables:
6967
EDITOR_VERSION: {{ editor.version }}
7068
commands:
71-
- {{ utr_install_nix }}
7269
- {{ upm_ci_install }}
7370
# Get version 2.3.0-preview of doctools package (it currently fails for 3.0.0-preview).
7471
# Automatically makes the documentation tests in APIVerification go live.
@@ -81,15 +78,14 @@
8178
# Run upm-ci verification tests as well as tests contained in the package.
8279
- upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u $EDITOR_VERSION {% if category.name == "functional" and platform.name == "mac" or platform.name == "linux" %} --enable-code-coverage --code-coverage-options "generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem;pathReplacePatterns:@*,,Library/PackageCache,Packages" --extra-utr-arg="--coverage-results-path={{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/Package --coverage-upload-options=\"reportsDir:upm-ci~/test-results/CodeCoverage/Package;name:{{platform.name}}_{{editor.version}}_pkg;flags:{{platform.name}}_{{editor.version}}_pkg\"" {% endif %}
8380
{% if platform.installscript %}
84-
- {{ unity_downloader_install }}
8581
- {{ platform.installscript }} $EDITOR_VERSION
8682
{% endif %}
8783
# ADBv2 on 2019.4 causes the test runner to not start on initial import when the
8884
# samples are in the package. Move the samples back into the project.
8985
- mv ./Packages/com.unity.inputsystem/Samples ./Assets
9086
- mv ./Packages/com.unity.inputsystem/Samples.meta ./Assets
9187
# Now run our full test suite that sits in Assets/Tests by running UTR on our project.
92-
- ./utr --testproject . --timeout=1200 --editor-location=.Editor --artifacts_path=upm-ci~/test-results/isolation-com.unity.inputsystem.tests --suite=playmode {% if platform.name == "mac" or platform.name == "linux"%} --suite=editor {% endif %} {% if category.name == "performance" %} --category=Performance {% else %} --category=!Performance {% endif %} --api-profile=NET_4_6 {% if platform.runtime %} --platform {{ platform.runtime }} {% endif %} {% if platform.scripting-backend %} --scripting-backend {{ platform.scripting-backend }} {% endif %} {% if category.name == "performance" %} --report-performance-data --performance-project-id=InputSystem {% endif %} {% if category.name == "functional" and platform.name == "mac" or platform.name == "linux" %} --enable-code-coverage --coverage-options="generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem" --coverage-results-path={{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/Project --coverage-upload-options="reportsDir:upm-ci~/test-results/CodeCoverage/Project;name:{{platform.name}}_{{editor.version}}_project;flags:{{platform.name}}_{{editor.version}}_project" {% endif %}
88+
- UnifiedTestRunner --testproject . --timeout=1200 --editor-location=.Editor --artifacts_path=upm-ci~/test-results/isolation-com.unity.inputsystem.tests --suite=playmode {% if platform.name == "mac" or platform.name == "linux"%} --suite=editor {% endif %} {% if category.name == "performance" %} --category=Performance {% else %} --category=!Performance {% endif %} --api-profile=NET_4_6 {% if platform.runtime %} --platform {{ platform.runtime }} {% endif %} {% if platform.scripting-backend %} --scripting-backend {{ platform.scripting-backend }} {% endif %} {% if category.name == "performance" %} --report-performance-data --performance-project-id=InputSystem {% endif %} {% if category.name == "functional" and platform.name == "mac" or platform.name == "linux" %} --enable-code-coverage --coverage-options="generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem" --coverage-results-path={{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/Project --coverage-upload-options="reportsDir:upm-ci~/test-results/CodeCoverage/Project;name:{{platform.name}}_{{editor.version}}_project;flags:{{platform.name}}_{{editor.version}}_project" {% endif %}
9389
{% if category.name == "functional" and platform.name == "mac" or platform.name == "linux"%}
9490
# Delete the Package and Project reports & raw coverage data, to keep Artifacts.zip smaller
9591
- rm -rf {{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/Package
@@ -123,10 +119,8 @@ build_ios_{{ editor.version }}_{{ category.name }}:
123119
EDITOR_VERSION: {{ editor.version }}
124120
UTR_VERSION: 1.35.1
125121
commands:
126-
- {{ utr_install_nix }}
127-
- {{ unity_downloader_install }}
128122
- unity-downloader-cli -c Editor -c iOS -u $EDITOR_VERSION --fast --wait
129-
- ./utr --suite=playmode {% if category.name == "performance" %} --category=Performance {% else %} --category=!Performance {% endif %} --platform=iOS --editor-location=.Editor --testproject=. --player-save-path=build/players --artifacts_path=build/logs --build-only {% if category.name == "performance" %} --report-performance-data --performance-project-id=InputSystem {% endif %}
123+
- UnifiedTestRunner --suite=playmode {% if category.name == "performance" %} --category=Performance {% else %} --category=!Performance {% endif %} --platform=iOS --editor-location=.Editor --testproject=. --player-save-path=build/players --artifacts_path=build/logs --build-only {% if category.name == "performance" %} --report-performance-data --performance-project-id=InputSystem {% endif %}
130124
after:
131125
- {{ instabilities_install_nix }}
132126
- {{ instabilities_run_mac }}
@@ -153,8 +147,7 @@ run_ios_{{ editor.version }}_{{ category.name }}:
153147
dependencies:
154148
- .yamato/upm-ci.yml#build_ios_{{ editor.version }}_{{ category.name }}
155149
commands:
156-
- {{ utr_install_nix }}
157-
- ./utr --suite=playmode {% if category.name == "performance" %} --category=Performance {% else %} --category=!Performance {% endif %} --platform=iOS --player-load-path=build/players --artifacts_path=build/test-results {% if category.name == "performance" %} --report-performance-data --performance-project-id=InputSystem {% endif %}
150+
- UnifiedTestRunner --suite=playmode {% if category.name == "performance" %} --category=Performance {% else %} --category=!Performance {% endif %} --platform=iOS --player-load-path=build/players --artifacts_path=build/test-results {% if category.name == "performance" %} --report-performance-data --performance-project-id=InputSystem {% endif %}
158151
after:
159152
- {{ instabilities_install_nix }}
160153
- {{ instabilities_run_mac }}
@@ -173,10 +166,8 @@ build_tvos_{{ editor.version }}_{{ category.name }}:
173166
EDITOR_VERSION: {{ editor.version }}
174167
UTR_VERSION: 1.35.1
175168
commands:
176-
- {{ utr_install_nix }}
177-
- {{ unity_downloader_install }}
178169
- unity-downloader-cli -c Editor -c AppleTV -u $EDITOR_VERSION --fast --wait
179-
- ./utr --suite=playmode {% if category.name == "performance" %} --category=Performance {% else %} --category=!Performance {% endif %} --platform=tvOS --editor-location=.Editor --testproject=. --player-save-path=build/players --artifacts_path=build/logs --build-only {% if category.name == "performance" %} --report-performance-data --performance-project-id=InputSystem {% endif %}
170+
- UnifiedTestRunner --suite=playmode {% if category.name == "performance" %} --category=Performance {% else %} --category=!Performance {% endif %} --platform=tvOS --editor-location=.Editor --testproject=. --player-save-path=build/players --artifacts_path=build/logs --build-only {% if category.name == "performance" %} --report-performance-data --performance-project-id=InputSystem {% endif %}
180171
after:
181172
- {{ instabilities_install_nix }}
182173
- {{ instabilities_run_mac }}
@@ -202,8 +193,7 @@ run_tvos_{{ editor.version }}_{{ category.name }}:
202193
dependencies:
203194
- .yamato/upm-ci.yml#build_tvos_{{ editor.version }}_{{ category.name }}
204195
commands:
205-
- {{ utr_install_nix }}
206-
- ./utr --suite=playmode {% if category.name == "performance" %} --category=Performance {% else %} --category=!Performance {% endif %} --platform=tvOS --player-load-path=build/players --artifacts_path=build/test-results {% if category.name == "performance" %} --report-performance-data --performance-project-id=InputSystem {% endif %}
196+
- UnifiedTestRunner --suite=playmode {% if category.name == "performance" %} --category=Performance {% else %} --category=!Performance {% endif %} --platform=tvOS --player-load-path=build/players --artifacts_path=build/test-results {% if category.name == "performance" %} --report-performance-data --performance-project-id=InputSystem {% endif %}
207197
after:
208198
- {{ instabilities_install_nix }}
209199
- {{ instabilities_run_mac }}
@@ -224,10 +214,8 @@ build_android_{{ editor.version }}_{{ backend.name }}_{{ category.name }}:
224214
variables:
225215
EDITOR_VERSION: {{ editor.version }}
226216
commands:
227-
- {{ utr_install_win }}
228-
- {{ unity_downloader_install }}
229217
- unity-downloader-cli -c Editor -c Android -u %EDITOR_VERSION% --fast --wait
230-
- ./utr --suite=playmode {% if category.name == "performance" %} --category=Performance {% else %} --category=!Performance {% endif %} --platform=Android --editor-location=.Editor --testproject=. --player-save-path=build/players --artifacts_path=build/logs --scripting-backend={{ backend.name }} --build-only --repository {% if category.name == "performance" %} --performance-project-id=InputSystem {% endif %}
218+
- UnifiedTestRunner --suite=playmode {% if category.name == "performance" %} --category=Performance {% else %} --category=!Performance {% endif %} --platform=Android --editor-location=.Editor --testproject=. --player-save-path=build/players --artifacts_path=build/logs --scripting-backend={{ backend.name }} --build-only --repository {% if category.name == "performance" %} --performance-project-id=InputSystem {% endif %}
231219
after:
232220
- {{ instabilities_install_win }}
233221
- {{ instabilities_run_win }}
@@ -253,15 +241,14 @@ run_android_{{ editor.version }}_{{ backend.name }}_{{ category.name }}:
253241
dependencies:
254242
- .yamato/upm-ci.yml#build_android_{{ editor.version }}_{{ backend.name }}_{{ category.name }}
255243
commands:
256-
- {{ utr_install_win }}
257244
- |
258245
# Set the IP of the device. In case device gets lost, UTR will try to recconect to ANDROID_DEVICE_CONNECTION
259246
set ANDROID_DEVICE_CONNECTION=%BOKKEN_DEVICE_IP%
260247
# Establish an ADB connection with the device
261248
start %ANDROID_SDK_ROOT%\platform-tools\adb.exe connect %BOKKEN_DEVICE_IP%
262249
# List the connected devices
263250
start %ANDROID_SDK_ROOT%\platform-tools\adb.exe devices
264-
./utr --suite=playmode {% if category.name == "performance" %} --category=Performance {% else %} --category=!Performance {% endif %} --platform=android --player-load-path=build/players --artifacts_path=build/test-results {% if category.name == "performance" %} --report-performance-data --performance-project-id=InputSystem {% endif %}
251+
UnifiedTestRunner --suite=playmode {% if category.name == "performance" %} --category=Performance {% else %} --category=!Performance {% endif %} --platform=android --player-load-path=build/players --artifacts_path=build/test-results {% if category.name == "performance" %} --report-performance-data --performance-project-id=InputSystem {% endif %}
265252
after:
266253
- start %ANDROID_SDK_ROOT%\platform-tools\adb.exe connect %BOKKEN_DEVICE_IP%
267254
- if not exist build\test-results mkdir build\test-results

0 commit comments

Comments
 (0)