From 31d70ebfd55571612d1024301a3d9c6cfd00336a Mon Sep 17 00:00:00 2001 From: Koji Hasegawa Date: Tue, 3 Sep 2024 11:44:33 +0900 Subject: [PATCH 1/2] Pin test-framework version to v1.4.5 --- .github/workflows/test.yml | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 998f446..e156f32 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -71,7 +71,7 @@ jobs: - name: Install dependencies run: | npm install -g openupm-cli - openupm add -f com.unity.test-framework@1.4.4 + openupm add -f com.unity.test-framework@1.4.5 openupm add -f com.unity.testtools.codecoverage openupm add -f com.cysharp.unitask working-directory: ${{ env.CREATED_PROJECT_PATH }} diff --git a/Makefile b/Makefile index e2e7941..20b0973 100644 --- a/Makefile +++ b/Makefile @@ -123,7 +123,7 @@ create_project: -batchmode \ -quit touch UnityProject~/Assets/.gitkeep - openupm -c $(PROJECT_HOME) add -f com.unity.test-framework@1.4.4 + openupm -c $(PROJECT_HOME) add -f com.unity.test-framework@1.4.5 openupm -c $(PROJECT_HOME) add -f com.unity.testtools.codecoverage openupm -c $(PROJECT_HOME) add -f com.cysharp.unitask openupm -c $(PROJECT_HOME) add -ft $(PACKAGE_NAME)@file:../../ From a32545b826a0cd7f450fd4b9f3463722dbc69f7f Mon Sep 17 00:00:00 2001 From: Koji Hasegawa Date: Mon, 16 Sep 2024 20:39:39 +0900 Subject: [PATCH 2/2] Ignore tests that use WaitForEndOfFrame run tests on batchmode --- Tests/Runtime/Attributes/GizmosShowOnGameViewAttributeTest.cs | 2 ++ Tests/Runtime/Attributes/TakeScreenshotAttributeTest.cs | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/Tests/Runtime/Attributes/GizmosShowOnGameViewAttributeTest.cs b/Tests/Runtime/Attributes/GizmosShowOnGameViewAttributeTest.cs index c1f2458..8dc6b85 100644 --- a/Tests/Runtime/Attributes/GizmosShowOnGameViewAttributeTest.cs +++ b/Tests/Runtime/Attributes/GizmosShowOnGameViewAttributeTest.cs @@ -62,6 +62,8 @@ public async Task AttachToAsyncTest_ShowGizmos() await Task.Yield(); } + [IgnoreBatchMode( + "The following error occurred since UTF v1.4.5: UnityTest yielded WaitForEndOfFrame, which is not evoked in batchmode.")] [UnityTest] [CreateScene(camera: true, light: true)] [GizmosShowOnGameView] diff --git a/Tests/Runtime/Attributes/TakeScreenshotAttributeTest.cs b/Tests/Runtime/Attributes/TakeScreenshotAttributeTest.cs index 914369b..fbdb4fc 100644 --- a/Tests/Runtime/Attributes/TakeScreenshotAttributeTest.cs +++ b/Tests/Runtime/Attributes/TakeScreenshotAttributeTest.cs @@ -88,6 +88,8 @@ public void AttachToAsyncTest_SaveScreenshotToDefaultPath_ExistFile() Assert.That(new FileInfo(path), Has.Length.GreaterThan(FileSizeThreshold)); } + [IgnoreBatchMode( + "The following error occurred since UTF v1.4.5: UnityTest yielded WaitForEndOfFrame, which is not evoked in batchmode.")] [UnityTest, Order(0)] [LoadScene(TestScene)] [TakeScreenshot] @@ -107,6 +109,8 @@ public IEnumerator AttachToUnityTest_SaveScreenshotToDefaultPath() // Take screenshot after running the test. } + [IgnoreBatchMode( + "The following error occurred since UTF v1.4.5: UnityTest yielded WaitForEndOfFrame, which is not evoked in batchmode.")] [Test, Order(1)] public void AttachToUnityTest_SaveScreenshotToDefaultPath_ExistFile() {