Skip to content

Commit

Permalink
Merge branch 'development' into Multi-Select
Browse files Browse the repository at this point in the history
  • Loading branch information
mtschoen-unity committed Sep 11, 2020
2 parents 4f2d572 + 567341c commit 06066a8
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 6 deletions.
38 changes: 34 additions & 4 deletions .yamato/test.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand Down Expand Up @@ -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 %}
4 changes: 2 additions & 2 deletions Runtime/Scripts/Core/VRView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -552,5 +552,5 @@ void SetAutoRepaintOnSceneChanged(Type viewType, bool enabled)
}
}
#endif
}
}
}
}
12 changes: 12 additions & 0 deletions Tests/Editor/Unit/Core/EditingContextManagerTests.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -47,6 +52,7 @@ public void Setup()
EditingContextManager.SaveProjectSettings(settings);
}

#if UNITY_EDITORXR_EDIT_MODE_SUPPORT
[Test]
public void Initializes_WithDefaultContext()
{
Expand Down Expand Up @@ -87,6 +93,7 @@ public void RestorePreviousContext_SetsPreviousContextToCurrent()
manager.RestorePreviousContext();
Assert.AreEqual(beginningContext, manager.currentContext);
}
#endif

[Test]
public void LoadProjectSettings_IfAssetFound()
Expand Down Expand Up @@ -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
}
}

Expand Down

0 comments on commit 06066a8

Please sign in to comment.