Skip to content

Fix tests in trunk#6315

Open
montplaisir wants to merge 5 commits into
developfrom
viviane/fix-for-6-6
Open

Fix tests in trunk#6315
montplaisir wants to merge 5 commits into
developfrom
viviane/fix-for-6-6

Conversation

@montplaisir

Copy link
Copy Markdown
Contributor

Proposed change(s)

Tests with trunk did not run anymore, and we had to use Unity 6.5 (See #6304)
Now, as suggested internally, use upm-pvp instead of upm-ci.

Types of change(s)

CI fix

@montplaisir
montplaisir requested a review from Codengineer July 23, 2026 18:58

@u-pr u-pr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Harness Review

Needs changes

The CI migration is narrowly scoped, but it currently drops part of the trunk test coverage instead of only changing the runner.

Reviewed commit 727175d9

🤖 Helpful? 👍/👎

Comment thread .yamato/com.unity.ml-agents-test.yml Outdated
npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
upm-ci project test -u {{ editor.version }} --project-path {{ editor.testProject }} --package-filter {{ package.name }} --extra-create-project-arg="-upmNoDefaultPackages" --extra-utr-arg "reruncount=2"
- unity-downloader-cli -u {{ editor.version }} -c editor --wait --fast
- upm-pvp create-test-project test-project --packages "upm-ci~/packages/*.tgz" --unity .Editor

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1

This switches the trunk lane from testing the checked-in DevProject to creating a fresh project from the packed UPM tarballs, which means the DevProject-only dev test assemblies stop running. In this repo those tests live under DevProject/Assets/ML-Agents/Scripts/Tests/... (Unity.ML-Agents.DevTests.Editor in Editor.asmdef, Unity.ML-Agents.DevTests.Runtime in Runtime.asmdef), with concrete cases like MLAgentsSettingsTests and AcademyStepperTest. The packed inputs for this flow are only the root packages (com.unity.ml-agents and com.unity.ml-agents.tests), so those DevProject assets are not present in the generated test-project. As a result, trunk will no longer catch regressions covered only by these dev tests. Please either keep running trunk against DevProject, or move/include the dev-test assemblies in the package-based project before invoking UTR.

🤖 Helpful? 👍/👎

Codengineer and others added 5 commits July 23, 2026 15:31
 Rebuild Google.Protobuf_Packed.dll from source (netstandard2.0) without merging System.Memory/System.Buffers polyfills into the assembly. The previous packed DLL embedded the Span<T> polyfill, which caused IL2CPP to crash in IntrinsicRemap.SpanGetItemArguments during standalone player builds. The rebuilt DLL references System.Memory externally, letting Unity resolve Span<T> through its BCL type-forwarder.

Also set isOverridable to 0 in the plugin meta to prevent com.unity.ai.inference's editor-only copy from shadowing this DLL during builds.
Fixes #6310
@montplaisir
montplaisir force-pushed the viviane/fix-for-6-6 branch from 727175d to 3ab1c83 Compare July 23, 2026 19:32
@montplaisir

Copy link
Copy Markdown
Contributor Author

/review

@u-pr u-pr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Harness Review

Needs changes

The trunk lane update is narrowly scoped, but the new test invocation now depends on tooling that this job no longer provisions itself.

Reviewed commit 3ab1c836

🤖 Helpful? 👍/👎

npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
upm-ci project test -u {{ editor.version }} --project-path {{ editor.testProject }} --package-filter {{ package.name }} --extra-create-project-arg="-upmNoDefaultPackages" --extra-utr-arg "reruncount=2"
- unity-downloader-cli -u {{ editor.version }} -c editor --wait --fast
- UnifiedTestRunner --suite=editor --suite=playmode --editor-location=.Editor --testproject={{ editor.testProject }} --artifacts-path=upm-ci~/test-results --reruncount=2

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1

This job now calls UnifiedTestRunner directly, but unlike every other active direct UTR invocation in this repo it does not bootstrap that tool first. The Wrench-generated jobs all curl/extract wrench-localapv.zip before running UnifiedTestRunner, and the older non-Wrench example fetched utr explicitly; this template now has neither step after removing upm-ci. On a clean agent that means trunk can fail with UnifiedTestRunner: command not found before any tests run. Please either add the same bootstrap/install step used by the existing UTR jobs, or keep using the wrapper that provisions UTR for you.

🤖 Helpful? 👍/👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants