Skip to content

Commit 96c9611

Browse files
committed
Swap --clean-library-on-rerun to --clean-library to see if that'll allow us to only rerun failed tests
1 parent 5a240a9 commit 96c9611

8 files changed

+44
-44
lines changed

.yamato/cmb-service-standalone-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ cmb_service_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}
5757
- ./Tools/CI/run_cmb_service.sh -e $ECHO_SERVER_PORT -s $CMB_SERVICE_PORT
5858

5959
- unity-downloader-cli --fast --wait -u {{ editor }} -c Editor {% if backend == "il2cpp" %} -c il2cpp {% endif %} {% if platform.name == "mac" %} --arch arm64 {% endif %} # For macOS we use ARM64 models
60-
- UnifiedTestRunner --suite=playmode --player-load-path=build/players --artifacts-path=test-results --testproject={{ project.path }} --editor-location=.Editor --playergraphicsapi=Null --fail-on-assert --reruncount=1 --clean-library-on-rerun --timeout=1800
60+
- UnifiedTestRunner --suite=playmode --player-load-path=build/players --artifacts-path=test-results --testproject={{ project.path }} --editor-location=.Editor --playergraphicsapi=Null --fail-on-assert --reruncount=1 --clean-library --timeout=1800
6161
artifacts:
6262
logs:
6363
paths:

.yamato/code-coverage.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{% metadata_file .yamato/project.metafile %} # All configuration that is used to create different configurations (used in for loops) is taken from this file.
22
---
3-
3+
44
# DESCRIPTION--------------------------------------------------------------------------
55
# This job is responsible for executing package tests with code coverage analysis enabled.
66
# Coverage analysis provides insights into:
77
# Test coverage metrics for NGO assemblies
88
# Line and branch coverage statistics
99
# Generated HTML reports for coverage visualization
1010
# Additional metrics for coverage analysis
11-
11+
1212
# CONFIGURATION STRUCTURE--------------------------------------------------------------
1313
# Jobs are generated using nested loops through:
1414
# 1. For default platform only (Ubuntu) since coverage would not vary between platforms (no need for checks on more platforms)
@@ -19,12 +19,12 @@
1919
# Requires Unity Editor installation
2020
# Burst compilation is disabled to ensure accurate coverage measurement
2121
# In order to properly use -coverage-results-path parameter we need to start it with $PWD (which means the absolute path). Otherwise coverage results will not be visible
22-
22+
2323
# QUALITY CONSIDERATIONS--------------------------------------------------------------------
2424
# To see where this job is included (in trigger job definitions) look into _triggers.yml file
25-
26-
27-
25+
26+
27+
2828
{% for platform in test_platforms.default -%}
2929
{% for editor in validation_editors.default -%}
3030
code_coverage_{{ platform.name }}_{{ editor }}:
@@ -39,12 +39,12 @@ code_coverage_{{ platform.name }}_{{ editor }}:
3939
commands:
4040
- unity-downloader-cli --fast --wait -u {{ editor }} -c Editor {% if platform.name == "mac" %} --arch arm64 {% endif %} # For macOS we use ARM64 models
4141
- upm-pvp create-test-project test-project --packages "upm-ci~/packages/*.tgz" --unity .Editor
42-
- UnifiedTestRunner --suite=editor --suite=playmode --editor-location=.Editor --testproject=test-project --enable-code-coverage coverage-upload-options="reportsDir:$PWD/test-results/CoverageResults;name:NGOv2_{{ platform.name }}_{{ editor }};flags:NGOv2_{{ platform.name }}_{{ editor }};verbose" --coverage-results-path=$PWD/test-results/CoverageResults --coverage-options="generateHtmlReport;generateAdditionalMetrics;assemblyFilters:+Unity.Netcode.Editor,+Unity.Netcode.Runtime" --extra-editor-arg=--burst-disable-compilation --timeout=1800 --reruncount=1 --clean-library-on-rerun --artifacts-path=test-results
42+
- UnifiedTestRunner --suite=editor --suite=playmode --editor-location=.Editor --testproject=test-project --enable-code-coverage coverage-upload-options="reportsDir:$PWD/test-results/CoverageResults;name:NGOv2_{{ platform.name }}_{{ editor }};flags:NGOv2_{{ platform.name }}_{{ editor }};verbose" --coverage-results-path=$PWD/test-results/CoverageResults --coverage-options="generateHtmlReport;generateAdditionalMetrics;assemblyFilters:+Unity.Netcode.Editor,+Unity.Netcode.Runtime" --extra-editor-arg=--burst-disable-compilation --timeout=1800 --reruncount=1 --clean-library --artifacts-path=test-results
4343
artifacts:
4444
logs:
4545
paths:
4646
- "test-results/**/*"
4747
dependencies:
4848
- .yamato/package-pack.yml#package_pack_-_ngo_{{ platform.name }}
4949
{% endfor -%}
50-
{% endfor -%}
50+
{% endfor -%}

.yamato/console-standalone-test.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# DESCRIPTION--------------------------------------------------------------------------
55
# This job is responsible for Console platform test validation.
66
# Those tests cover both PlayMode and EditMode tests from package test assemblies.
7-
7+
88
# CONFIGURATION STRUCTURE--------------------------------------------------------------
99
# Jobs are generated using nested loops (separate build phase and run phase). Worth noting that run phase uses the build as dependency:
1010
# 1. For all console platform (Switch, ps4, ps5, xbox360, xboxOne)
@@ -16,10 +16,10 @@
1616
# 1. Build Phase: Creates standalone players for console platforms
1717
# 2. Run Phase: Executes runtime tests on actual console devices
1818
# The Run phase uses build job as dependency
19-
19+
2020
# Note: More of a Unity specific but test assemblies need to be included in the build phase command
2121
# Note: All builds can be made on x64 machines since those are compatible with ARM64 target devices
22-
22+
2323
# PLATFORM SPECIFICS-----------------------------------------------------------------
2424
# Common Requirements:
2525
# All consoles require IL2CPP scripting backend
@@ -29,13 +29,13 @@
2929
# Switch: ARM64 architecture only
3030
# Other Consoles: x64 architecture
3131
# Each console requires specific SDK paths and tools
32-
32+
3333
# QUALITY THOUGHTS--------------------------------------------------------------------
3434
# TODO: consider adding all projects that have tests
3535
# To see where this job is included (in trigger job definitions) look into _triggers.yml file
3636

37-
38-
37+
38+
3939
# BUILD PHASE CONFIGURATION------------------------------------------------------------------------------------
4040
{% for project in projects.default -%}
4141
{% for platform in test_platforms.console_build -%}
@@ -51,7 +51,7 @@ console_standalone_build_{{ project.name }}_{{ platform.name }}_{{ editor }}:
5151
{% endif %}
5252
commands:
5353
- unity-downloader-cli --fast --wait -u {{ editor }} -c Editor -c il2cpp -c {{ platform.name }}
54-
- UnifiedTestRunner --testproject={{ project.path }} --architecture={% if platform.name == "switch" %}arm64{% else %}x64{% endif %} --scripting-backend=il2cpp --suite=playmode --platform={{ platform.standalone }} --editor-location=.Editor --artifacts-path=artifacts --player-save-path=build/players --testfilter="Unity.Netcode.RuntimeTests.*" --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --reruncount=1 --clean-library-on-rerun --build-only --timeout=1800
54+
- UnifiedTestRunner --testproject={{ project.path }} --architecture={% if platform.name == "switch" %}arm64{% else %}x64{% endif %} --scripting-backend=il2cpp --suite=playmode --platform={{ platform.standalone }} --editor-location=.Editor --artifacts-path=artifacts --player-save-path=build/players --testfilter="Unity.Netcode.RuntimeTests.*" --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --reruncount=1 --clean-library --build-only --timeout=1800
5555
variables:
5656
# PS4 related
5757
SCE_ORBIS_SDK_DIR: 'C:\Users\bokken\SCE\ps4_sdk_12_00'
@@ -72,9 +72,9 @@ console_standalone_build_{{ project.name }}_{{ platform.name }}_{{ editor }}:
7272
{% endfor -%}
7373
{% endfor -%}
7474
{% endfor -%}
75-
76-
77-
75+
76+
77+
7878
# RUN PHASE CONFIGURATION------------------------------------------------------------------------------------
7979
{% for project in projects.default -%}
8080
{% for platform in test_platforms.console_test -%}
@@ -90,7 +90,7 @@ console_standalone_test_{{ project.name }}_{{ platform.name }}_{{ editor }}:
9090
{% endif %}
9191
commands:
9292
- unity-downloader-cli --fast --wait -u {{ editor }} -c Editor -c il2cpp -c {{ platform.name }}
93-
- UnifiedTestRunner --suite=playmode --testproject={{ project.path }} --editor-location=.Editor --artifacts-path=test-results --player-load-path=build/players --fail-on-assert --reruncount=1 --clean-library-on-rerun --timeout=1800
93+
- UnifiedTestRunner --suite=playmode --testproject={{ project.path }} --editor-location=.Editor --artifacts-path=test-results --player-load-path=build/players --fail-on-assert --reruncount=1 --clean-library --timeout=1800
9494
variables:
9595
# PS4 related
9696
SCE_ORBIS_SDK_DIR: 'C:\Users\bokken\SCE\ps4_sdk_12_00'
@@ -109,4 +109,4 @@ console_standalone_test_{{ project.name }}_{{ platform.name }}_{{ editor }}:
109109
- .yamato/console-standalone-test.yml#console_standalone_build_{{ project.name }}_{{ platform.name }}_{{ editor }}
110110
{% endfor -%}
111111
{% endfor -%}
112-
{% endfor -%}
112+
{% endfor -%}

.yamato/desktop-standalone-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ desktop_standalone_build_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{
4444
{% endif %}
4545
commands:
4646
- unity-downloader-cli --fast --wait -u {{ editor }} -c Editor {% if backend == "il2cpp" %} -c il2cpp {% endif %}
47-
- UnifiedTestRunner --suite=playmode --platform={{ platform.standalone }} --editor-location=.Editor --testproject={{ project.path }} --scripting-backend={{ backend }} --testfilter="Unity.Netcode.RuntimeTests.*" --player-save-path=build/players --artifacts-path=artifacts --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --reruncount=1 --clean-library-on-rerun --build-only --timeout=1800
47+
- UnifiedTestRunner --suite=playmode --platform={{ platform.standalone }} --editor-location=.Editor --testproject={{ project.path }} --scripting-backend={{ backend }} --testfilter="Unity.Netcode.RuntimeTests.*" --player-save-path=build/players --artifacts-path=artifacts --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --reruncount=1 --clean-library --build-only --timeout=1800
4848
artifacts:
4949
players:
5050
paths:
@@ -79,7 +79,7 @@ desktop_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{
7979

8080
commands:
8181
- unity-downloader-cli --fast --wait -u {{ editor }} -c Editor {% if backend == "il2cpp" %} -c il2cpp {% endif %} {% if platform.name == "mac" %} --arch arm64 {% endif %} # For macOS we use ARM64 models
82-
- UnifiedTestRunner --suite=playmode --player-load-path=build/players --artifacts-path=test-results --testproject={{ project.path }} --editor-location=.Editor --playergraphicsapi=Null --fail-on-assert --reruncount=1 --clean-library-on-rerun --timeout=1800
82+
- UnifiedTestRunner --suite=playmode --player-load-path=build/players --artifacts-path=test-results --testproject={{ project.path }} --editor-location=.Editor --playergraphicsapi=Null --fail-on-assert --reruncount=1 --clean-library --timeout=1800
8383
artifacts:
8484
logs:
8585
paths:

.yamato/mobile-standalone-test.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@
44
# DESCRIPTION--------------------------------------------------------------------------
55
# This job is responsible for Mobile platform test validation.
66
# Those tests cover both PlayMode and EditMode tests from package test assemblies.
7-
7+
88
# CONFIGURATION STRUCTURE--------------------------------------------------------------
99
# Jobs are generated using nested loops through:
1010
# 1. For all mobile platform (Android, iOS)
1111
# 2. For all supported Unity Editor versions (for NGOv2.X this means 6000.0+ editors)
1212
# 3. For the default project.
13-
13+
1414
# TECHNICAL CONSIDERATIONS---------------------------------------------------------------
1515
# For mobile devices a split is required into two phases:
1616
# 1. Build Phase: Creates standalone players for mobile platforms
1717
# 2. Run Phase: Executes runtime tests on actual mobile devices
1818
# The Run phase uses build job as dependency
1919
# Note: More of a Unity specific but test assemblies need to be included in the build phase command
2020
# Note: All builds can be made on x64 machines since those are compatible with ARM64 target devices
21-
21+
2222
# PLATFORM SPECIFICS--------------------------------------------------------------------
2323
# iOS Requirements:
2424
# Must use IL2CPP scripting backend
@@ -29,12 +29,12 @@
2929
# Uses IL2CPP scripting backend (recommended over Mono)
3030
# Supports both ARM64 and ARMv7 architectures
3131
# Can be build on any desktop platform
32-
32+
3333
# QUALITY CONSIDERATIONS--------------------------------------------------------------------
3434
# TODO: consider adding all projects that have tests
3535
# To see where this job is included (in trigger job definitions) look into _triggers.yml file
36-
37-
36+
37+
3838
# BUILD PHASE CONFIGURATION------------------------------------------------------------------------------------
3939
{% for project in projects.default -%}
4040
{% for platform in test_platforms.mobile_build -%}
@@ -48,14 +48,14 @@ mobile_standalone_build_{{ project.name }}_{{ platform.name }}_{{ editor }}:
4848
{% if platform.model %}
4949
model: {{ platform.model }} # This is set only in platforms where we want non-default model to use (more information in project.metafile)
5050
{% endif %}
51-
# Automatic UI interruption handling is available for iPhones running iOS 15 and above (models SE-Gen3 and 13).
51+
# Automatic UI interruption handling is available for iPhones running iOS 15 and above (models SE-Gen3 and 13).
5252
# It is enabled by default when using those devices. Otherwise, system alerts (e.g. “Local Network Access” permission alert, introduced in iOS 14) might cause disruptions during test execution.
5353
# If building of the test app is done on a separate (“Build”) job, please make sure that that job has environment variable UNITY_HANDLEUIINTERRUPTIONS set to 1.
5454
variables:
5555
UNITY_HANDLEUIINTERRUPTIONS: 1
5656
commands:
5757
- unity-downloader-cli --fast --wait -u {{ editor }} -c Editor -c il2cpp {% if platform.base == "mac" %} -c ios {% else %} -c android {% endif %}
58-
- UnifiedTestRunner --suite=playmode --platform={{ platform.standalone }} --testproject={{ project.path }} --architecture={{ platform.architecture }} --scripting-backend=il2cpp --editor-location=.Editor --artifacts-path=artifacts --testfilter="Unity.Netcode.RuntimeTests.*" --player-save-path=build/players --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --reruncount=1 --clean-library-on-rerun --build-only --timeout=1800
58+
- UnifiedTestRunner --suite=playmode --platform={{ platform.standalone }} --testproject={{ project.path }} --architecture={{ platform.architecture }} --scripting-backend=il2cpp --editor-location=.Editor --artifacts-path=artifacts --testfilter="Unity.Netcode.RuntimeTests.*" --player-save-path=build/players --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --reruncount=1 --clean-library --build-only --timeout=1800
5959
artifacts:
6060
players:
6161
paths:
@@ -66,8 +66,8 @@ mobile_standalone_build_{{ project.name }}_{{ platform.name }}_{{ editor }}:
6666
{% endfor -%}
6767
{% endfor -%}
6868
{% endfor -%}
69-
70-
69+
70+
7171
# RUN PHASE CONFIGURATION------------------------------------------------------------------------------------
7272
{% for project in projects.default -%}
7373
{% for platform in test_platforms.mobile_test -%}
@@ -84,7 +84,7 @@ mobile_standalone_test_{{ project.name }}_{{ platform.name }}_{{ editor }}:
8484
commands:
8585
# Installing editor. We still need the editor to run tests on standalone build and for that the Editor is required
8686
- unity-downloader-cli --fast --wait -u {{ editor }} -c Editor -c il2cpp {% if platform.base == "mac" %} -c ios {% else %} -c android {% endif %}
87-
87+
8888
{% if platform.standalone == "Android" %}
8989
# Download standalone UnityTestRunner and ADB setup
9090
- command: wget http://artifactory-slo.bf.unity3d.com/artifactory/mobile-generic/android/ADBKeys.zip!/adbkey.pub -O %USERPROFILE%/.android/adbkey.pub
@@ -97,11 +97,11 @@ mobile_standalone_test_{{ project.name }}_{{ platform.name }}_{{ editor }}:
9797
# Run tests for Android devices
9898
- |
9999
set ANDROID_DEVICE_CONNECTION=%BOKKEN_DEVICE_IP%
100-
UnifiedTestRunner --suite=playmode --platform={{ platform.standalone }} --artifacts-path=test-results --player-load-path=build/players --testproject={{ project.path }} --editor-location=.Editor --player-connection-ip=%BOKKEN_HOST_IP% --fail-on-assert --reruncount=1 --clean-library-on-rerun --timeout=3600
100+
UnifiedTestRunner --suite=playmode --platform={{ platform.standalone }} --artifacts-path=test-results --player-load-path=build/players --testproject={{ project.path }} --editor-location=.Editor --player-connection-ip=%BOKKEN_HOST_IP% --fail-on-assert --reruncount=1 --clean-library --timeout=3600
101101
{% else %}
102102

103103
# Run tests for non-Android devices
104-
- UnifiedTestRunner --suite=playmode --platform={{ platform.standalone }} --artifacts-path=test-results --player-load-path=build/players --testproject={{ project.path }} --editor-location=.Editor --fail-on-assert --reruncount=1 --clean-library-on-rerun --timeout=3600 --device-id=%BOKKEN_DEVICE_ID%
104+
- UnifiedTestRunner --suite=playmode --platform={{ platform.standalone }} --artifacts-path=test-results --player-load-path=build/players --testproject={{ project.path }} --editor-location=.Editor --fail-on-assert --reruncount=1 --clean-library --timeout=3600 --device-id=%BOKKEN_DEVICE_ID%
105105
{% endif %}
106106
artifacts:
107107
logs:

.yamato/package-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ package_test_-_ngo_{{ editor }}_{{ platform.name }}:
4747

4848
# Run UTR to test packages.
4949
- upm-pvp create-test-project test-project --packages "upm-ci~/packages/*.tgz" --filter "com.unity.netcode.gameobjects" --unity .Editor
50-
- UnifiedTestRunner --suite=editor --suite=playmode --editor-location=.Editor --testproject=test-project --artifacts-path=test-results "--ff={ops.upmpvpevidence.enable=true}" --reruncount=1 --clean-library-on-rerun
50+
- UnifiedTestRunner --suite=editor --suite=playmode --editor-location=.Editor --testproject=test-project --artifacts-path=test-results "--ff={ops.upmpvpevidence.enable=true}" --reruncount=1 --clean-library
5151
artifacts:
5252
logs:
5353
paths:

0 commit comments

Comments
 (0)