diff --git a/.yamato/test.yml b/.yamato/test.yml index d44d7da79..ab5bec20b 100644 --- a/.yamato/test.yml +++ b/.yamato/test.yml @@ -1,5 +1,10 @@ -test_editors: +blocking_test_editors: - version: 2019.1.14f1 +nonblocking_test_editors: + - version: 2019.3.0f6 + - version: 2019.4 + - version: 2020.1 + - version: 2020.2 test_platforms: - name: win type: Unity::VM @@ -11,7 +16,27 @@ test_platforms: flavor: m1.mac --- -{% for editor in test_editors %} +{% for editor in blocking_test_editors %} +{% for platform in test_platforms %} +test_{{ platform.name }}_{{ editor.version }}: + name : Test {{ editor.version }} on {{ platform.name }} + agent: + type: {{ platform.type }} + image: {{ platform.image }} + flavor: {{ platform.flavor}} + commands: + - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm + - {% if platform.name == "centos" %}DISPLAY=:0 {% endif %}upm-ci package test -u {{ editor.version }} --package-path . --type package-tests + artifacts: + logs: + paths: + - "upm-ci~/test-results/**/*" + dependencies: + - .yamato/pack.yml#pack +{% endfor %} +{% endfor %} + +{% for editor in nonblocking_test_editors %} {% for platform in test_platforms %} test_{{ platform.name }}_{{ editor.version }}: name : Test {{ editor.version }} on {{ platform.name }} @@ -33,7 +58,7 @@ test_{{ platform.name }}_{{ editor.version }}: # Validate the package on each editor version and each platform # Validation only occurs in editmode. -{% for editor in test_editors %} +{% for editor in blocking_test_editors %} {% for platform in test_platforms %} validate_{{ platform.name }}_{{ editor.version }}: name : Validate {{ editor.version }} on {{ platform.name }} @@ -65,9 +90,14 @@ test_trigger: - "/.*/" dependencies: - .yamato/pack.yml#pack - {% for editor in test_editors %} + {% for editor in blocking_test_editors %} {% for platform in test_platforms %} - .yamato/test.yml#test_{{platform.name}}_{{editor.version}} - .yamato/test.yml#validate_{{platform.name}}_{{editor.version}} {% endfor %} {% endfor %} + {% for editor in nonblocking_test_editors %} + {% for platform in test_platforms %} + - .yamato/test.yml#test_{{platform.name}}_{{editor.version}} + {% endfor %} + {% endfor %} diff --git a/Runtime/Scripts/Core/VRView.cs b/Runtime/Scripts/Core/VRView.cs index 9fcfd17ad..1ab538245 100644 --- a/Runtime/Scripts/Core/VRView.cs +++ b/Runtime/Scripts/Core/VRView.cs @@ -552,5 +552,5 @@ void SetAutoRepaintOnSceneChanged(Type viewType, bool enabled) } } #endif - } - } + } +} diff --git a/Tests/Editor/Unit/Core/EditingContextManagerTests.cs b/Tests/Editor/Unit/Core/EditingContextManagerTests.cs index 30849fec4..d888cf292 100644 --- a/Tests/Editor/Unit/Core/EditingContextManagerTests.cs +++ b/Tests/Editor/Unit/Core/EditingContextManagerTests.cs @@ -1,3 +1,8 @@ +// Edit mode support requires legacy VR, which was removed in 2020.1 +#if UNITY_EDITOR && !UNITY_2020_1_OR_NEWER +#define UNITY_EDITORXR_EDIT_MODE_SUPPORT +#endif + using NUnit.Framework; using System.Collections.Generic; using System.IO; @@ -47,6 +52,7 @@ public void Setup() EditingContextManager.SaveProjectSettings(settings); } +#if UNITY_EDITORXR_EDIT_MODE_SUPPORT [Test] public void Initializes_WithDefaultContext() { @@ -87,6 +93,7 @@ public void RestorePreviousContext_SetsPreviousContextToCurrent() manager.RestorePreviousContext(); Assert.AreEqual(beginningContext, manager.currentContext); } +#endif [Test] public void LoadProjectSettings_IfAssetFound() @@ -163,10 +170,15 @@ public void SaveUserSettings_UpdatesUserSettingsFile() [OneTimeTearDown] public void Cleanup() { +#if UNITY_EDITORXR_EDIT_MODE_SUPPORT manager.SetEditingContext(EditingContextManager.defaultContext); +#endif UnityObjectUtils.Destroy(context); UnityObjectUtils.Destroy(context2); + +#if UNITY_EDITORXR_EDIT_MODE_SUPPORT VRView.activeView.Close(); +#endif } }