Skip to content

Commit ea37675

Browse files
EmandMNoelStephensUnitysimon-lemay-unitymichalChrobot
authored
fix: Yamato jobs not testing built player (Backport of: #4194) (#4196)
* fix: Yamato jobs not testing built player (Backport of: #4194) * fix: Yamato jobs not testing built player * Next round of fixes * Set addressables to build on players * dotnet-fix * Fix console tests * Try again to remove graphics from desktop players * Fix DA NetworkObjectDeserializationFailure test * Remove the temporarily added N4E settings * Fix the test failures * Remove fix that was more a symptom than a cause (keep it simple) * Match the deregistration to the registration logic * Don't finish cleaning up if any scene is still loading * Fix the U-PR config * Fix IL2CPP player tests * Remove CoreCLR stuff * feat: Improve error message on connection failure [2.X] (#4208) feat: Improve error message on connection failure * Disabled automatic release preparation Disabled recurring trigger as in our current situation it would be more messy to handle automated release step. I will leave it manual for now * chore: Ensure the rerun strategy is baked into the built players (#4218) * fix: generate canonical bools in NetworkVariable serialization tests (#4198) * test: generate canonical bools in NetworkVariable serialization tests RandGenBytes<bool> filled each bool with a random byte, so most values were neither 0 nor 1. On mac arm64 IL2CPP the List<bool> and NativeHashMap<K, bool> cases then failed with both sides printing identical all-True contents. RandGenBool returns only false or true. * test: use RandGenBool for the NativeArray<bool> case * test: make changed2 always differ from original2 in collection generators With RandGenBool an overwrite keeps the existing value half the time, so when no elements were added or removed, changed2 could equal original2 and the "do not match" assertions failed. Each overwrite now redraws until it differs from the original element. --------- Co-authored-by: Emma <emma.mcmillan@unity3d.com> (cherry picked from commit b5c186c) --------- Co-authored-by: Noel Stephens <noel.stephens@unity3d.com> Co-authored-by: Simon Lemay <simon.lemay@unity3d.com> Co-authored-by: Michał Chrobot <michal.chrobot@unity3d.com>
1 parent 853cb6d commit ea37675

15 files changed

Lines changed: 148 additions & 60 deletions

‎.pr_agent.toml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@
44
# https://developer.portal.internal.unity.com/catalog/default/component/u-pr/docs/configuration/automatic_runs/
55

66
[github_app]
7-
handle_pr_actions = ['opened', 'ready_for_review'] # PR events that auto-run pr_commands
87
pr_commands = ["/harness-review"] # what runs on those events
98
reviewer_commands = ["/harness-review"] # what runs when @u-pr is added as reviewer

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ cmb_service_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}
5656
# run_cmb_service.sh builds and starts a release version of the full CMB service (along with the limited echo server)
5757
- ./Tools/CI/service.cmb/run_cmb_service.sh -e $ECHO_SERVER_PORT -s $CMB_SERVICE_PORT -l artifacts
5858

59-
- 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 --rerun-strategy=Test --retry={{ num_test_retries }} --clean-library-on-rerun --timeout={{ test_timeout }}
59+
- UnifiedTestRunner --suite=playmode --platform={{ platform.standalone }} --scripting-backend={{ backend }} --player-load-path=build/players --artifacts-path=test-results --testproject={{ project.path }} --extra-player-arg=-batchmode --extra-player-arg=-nographics --fail-on-assert --rerun-strategy=Test --retry={{ num_test_retries }} --timeout={{ test_timeout }}
6160
artifacts:
6261
logs:
6362
paths:

‎.yamato/console-standalone-test.yml‎

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ console_standalone_build_{{ project.name }}_{{ platform.name }}_{{ editor }}:
5050
{% endif %}
5151
commands:
5252
- unity-downloader-cli --fast --wait -u {{ editor }} -c Editor -c il2cpp -c {{ platform.name }}
53-
- 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{% if platform.name == "switch" %} --extra-editor-arg=-overrideTextureCompression --extra-editor-arg=ForceUncompressed{% endif %} --reruncount=1 --clean-library-on-rerun --build-only --timeout={{ test_timeout}}
53+
- 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{% if platform.name == "switch" %} --extra-editor-arg=-overrideTextureCompression --extra-editor-arg=ForceUncompressed{% endif %} --rerun-strategy=Test --retry={{ num_test_retries }} --clean-library-on-rerun --build-only --timeout={{ test_timeout}}
5454
variables:
5555
# PS4 related
5656
SCE_ORBIS_SDK_DIR: 'C:\Users\bokken\SCE\ps4_sdk_12_00'
@@ -88,8 +88,17 @@ console_standalone_test_{{ project.name }}_{{ platform.name }}_{{ editor }}:
8888
model: {{ platform.model }} # This is set only in platforms where we want non-default model to use (more information in project.metafile)
8989
{% endif %}
9090
commands:
91-
- unity-downloader-cli --fast --wait -u {{ editor }} -c Editor -c il2cpp -c {{ platform.name }}
92-
- UnifiedTestRunner --suite=playmode --testproject={{ project.path }} --editor-location=.Editor --artifacts-path=test-results --player-load-path=build/players --fail-on-assert --rerun-strategy=Test --retry={{ num_test_retries }} --clean-library-on-rerun --timeout={{ test_timeout }}
91+
# Console players connect back to UTR's player connection listener on this VM, so the firewall must allow it
92+
- command: gsudo NetSh Advfirewall set allprofiles state off
93+
# Register the Bokken devkit with the platform's target tools so UTR can deploy and run the prebuilt player
94+
{% if platform.name == "ps5" %}
95+
- command: gsudo prospero-ctrl target add %BOKKEN_DEVICE_IP%
96+
{% elsif platform.name == "ps4" %}
97+
- command: orbis-ctrl add %BOKKEN_DEVICE_IP%
98+
{% else %}
99+
- command: '"%GameDK%/bin/xbconnect" /WS %BOKKEN_DEVICE_IP%'
100+
{% endif %}
101+
- UnifiedTestRunner --suite=playmode --platform={{ platform.standalone }} --scripting-backend=il2cpp --testproject={{ project.path }} --artifacts-path=test-results --player-load-path=build/players --player-connection-ip=%BOKKEN_HOST_IP% --fail-on-assert --rerun-strategy=Test --retry={{ num_test_retries }} --timeout={{ test_timeout }}
93102
variables:
94103
# PS4 related
95104
SCE_ORBIS_SDK_DIR: 'C:\Users\bokken\SCE\ps4_sdk_12_00'

‎.yamato/desktop-standalone-tests.yml‎

Lines changed: 2 additions & 3 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={{ test_timeout }}
47+
- UnifiedTestRunner --suite=playmode --platform={{ platform.standalone }} --editor-location=.Editor --testproject={{ project.path }} --scripting-backend={{ backend }} --testfilter="Unity.Netcode.RuntimeTests.*;TestProject.RuntimeTests.*" --playergraphicsapi=Null --player-save-path=build/players --artifacts-path=artifacts --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --rerun-strategy=Test --retry={{ num_test_retries }} --clean-library-on-rerun --build-only --timeout={{ test_timeout }}
4848
artifacts:
4949
players:
5050
paths:
@@ -79,8 +79,7 @@ desktop_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{
7979
{% endif %}
8080

8181
commands:
82-
- 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
83-
- UnifiedTestRunner --suite=playmode --player-load-path=build/players --artifacts-path=test-results --testproject={{ project.path }} --editor-location=.Editor --playergraphicsapi=Null --fail-on-assert --rerun-strategy=Test --retry={{ num_test_retries }} --clean-library-on-rerun --timeout={{ test_timeout }}
82+
- UnifiedTestRunner --suite=playmode --platform={{ platform.standalone }} --scripting-backend={{ backend }} --player-load-path=build/players --artifacts-path=test-results --testproject={{ project.path }} --extra-player-arg=-batchmode --extra-player-arg=-nographics --fail-on-assert --rerun-strategy=Test --retry={{ num_test_retries }} --timeout={{ test_timeout }}
8483
artifacts:
8584
logs:
8685
paths:

‎.yamato/mobile-standalone-test.yml‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ mobile_standalone_build_{{ project.name }}_{{ platform.name }}_{{ editor }}:
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={{ test_timeout }}
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 --rerun-strategy=Test --retry={{ num_test_retries }} --clean-library-on-rerun --build-only --timeout={{ test_timeout }}
5959
artifacts:
6060
players:
6161
paths:
@@ -82,9 +82,6 @@ mobile_standalone_test_{{ project.name }}_{{ platform.name }}_{{ editor }}:
8282
model: {{ platform.model }} # This is set only in platforms where we want non-default model to use (more information in project.metafile)
8383
{% endif %}
8484
commands:
85-
# Installing editor. We still need the editor to run tests on standalone build and for that the Editor is required
86-
- unity-downloader-cli --fast --wait -u {{ editor }} -c Editor -c il2cpp {% if platform.base == "mac" %} -c ios {% else %} -c android {% endif %}
87-
8885
{% if platform.standalone == "Android" %}
8986
# Download standalone UnityTestRunner and ADB setup
9087
- command: wget http://artifactory-slo.bf.unity3d.com/artifactory/mobile-generic/android/ADBKeys.zip!/adbkey.pub -O %USERPROFILE%/.android/adbkey.pub
@@ -97,11 +94,11 @@ mobile_standalone_test_{{ project.name }}_{{ platform.name }}_{{ editor }}:
9794
# Run tests for Android devices
9895
- |
9996
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 --rerun-strategy=Test --retry={{ num_test_retries }} --clean-library-on-rerun --timeout={{ test_timeout }}
97+
UnifiedTestRunner --suite=playmode --platform={{ platform.standalone }} --artifacts-path=test-results --player-load-path=build/players --testproject={{ project.path }} --player-connection-ip=%BOKKEN_HOST_IP% --fail-on-assert --rerun-strategy=Test --retry={{ num_test_retries }} --timeout={{ test_timeout }}
10198
{% else %}
10299

103100
# 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 --rerun-strategy=Test --retry={{ num_test_retries }} --clean-library-on-rerun --timeout={{ test_timeout }} --device-id=%BOKKEN_DEVICE_ID%
101+
- UnifiedTestRunner --suite=playmode --platform={{ platform.standalone }} --artifacts-path=test-results --player-load-path=build/players --testproject={{ project.path }} --fail-on-assert --rerun-strategy=Test --retry={{ num_test_retries }} --timeout={{ test_timeout }} --device-id=%BOKKEN_DEVICE_ID%
105102
{% endif %}
106103
artifacts:
107104
logs:

‎.yamato/webgl-build.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ webgl_build_{{ project.name }}_{{ platform.name }}_{{ editor }}:
4545
# Engine is initialized in ‘nographics’ mode since we don't need any graphics for this case (--extra-editor-arg=-nographics)
4646
# In case of failure the job will be rerunned once (--reruncount=1) with clean library (--clean-library-on-rerun). Note that this is build only step so no tests are being executed
4747
# This will perform only building phase (--build-only) with a timeout set by the test_timeout variable in the project metafile.
48-
- UnifiedTestRunner --suite=playmode --platform=WebGL --scripting-backend=il2cpp --testproject={{ project.path }} --editor-location=.Editor --artifacts_path=artifacts --player-save-path=build/players --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --reruncount=1 --clean-library-on-rerun --build-only --timeout={{ test_timeout }}
48+
- UnifiedTestRunner --suite=playmode --platform=WebGL --scripting-backend=il2cpp --testproject={{ project.path }} --editor-location=.Editor --artifacts_path=artifacts --player-save-path=build/players --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --rerun-strategy=Test --retry={{ num_test_retries }} --clean-library-on-rerun --build-only --timeout={{ test_timeout }}
4949
artifacts:
5050
logs:
5151
paths:

‎Tools/CI/service.cmb/run_cmb_service.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ cargo build --release --locked
171171
# The infinite loop is required as the service will exit each time all connected clients disconnect.
172172
# This means the service will exit after each test. The infinite loop will immediately restart the service each time it exits.
173173
logMessage "Running service integration tests..."
174-
echo "comb-server -l error --metrics-port 5000 standalone --port $service_port -t 60m --unity-version $unity_version"
174+
echo "comb-server -l warn -l ngo::session=info -l comb_server::session=info --metrics-port 5000 standalone --port $service_port -t 60m --unity-version $unity_version"
175175

176176
while :; do
177-
./target/release/comb-server -l error --metrics-port 5000 standalone --port $service_port -t 60m --unity-version $unity_version;
177+
./target/release/comb-server -l warn -l ngo::session=info -l comb_server::session=info --metrics-port 5000 standalone --port $service_port -t 60m --unity-version $unity_version;
178178
done & # <- use & to run the entire loop in the background

‎com.unity.netcode.gameobjects/Tests/Runtime/NetworkTransform/NetworkTransformOrderOfOperations.cs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ namespace Unity.Netcode.RuntimeTests
2424
[TestFixture(HostOrServer.DAHost)]
2525
[TestFixture(HostOrServer.Host)]
2626
[TestFixture(HostOrServer.Server)]
27+
[UnityPlatform(exclude = new[] { RuntimePlatform.PS4 })] // Ignored test tracked in MTT-16494
2728
internal class NetworkTransformOrderOfOperations : IntegrationTestWithApproximation
2829
{
2930
#region Configuration, Properties, and Overrides

0 commit comments

Comments
 (0)