Skip to content

Commit 4cdf197

Browse files
authored
Feature/urp test maintenance (#30)
* check urp image comparision tests timeout on yamato * Updated test projects mainly for Mac. * deleted hdrp mac test newer than 2020.3 because they cause timeout...
1 parent 5d27eeb commit 4cdf197

File tree

13 files changed

+61
-51
lines changed

13 files changed

+61
-51
lines changed

.yamato/osx_metal-hdrp-2019.4.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ test_projects:
55
- name: HDRPUTS_GraphicsTest-2019.4
66
unity_versions:
77
- name: 2019.4
8-
- name: 2020.1
9-
# - name: 2020.2
10-
# - name: 2021.1
11-
# - name: trunk
128
---
139
{% for test_project in test_projects %}
1410
{% for unity_version in unity_versions %}

.yamato/osx_metal-urp-2019.4.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ unity_versions:
77
- name: 2019.4
88
- name: 2020.3
99
- name: 2021.1
10-
# - name: 2021.2
10+
- name: 2021.2
1111
# - name: trunk
1212
---
1313
{% for test_project in test_projects %}

TestProjects/HDRPUTS_GraphicsTest-2019.4/Assets/Tests/HDRPUTS_GraphicsTests/HDRPUTS_GraphicsTestSettings.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,17 @@ namespace Tests
55
public class HDRPUTS_GraphicsTestSettings : GraphicsTestSettings
66
{
77
public int WaitFrames = 0;
8+
public bool XRCompatible = true;
9+
#if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX
10+
public bool CheckMemoryAllocation = false;
11+
#else
12+
public bool CheckMemoryAllocation = true;
13+
#endif //#if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX
814

915
public HDRPUTS_GraphicsTestSettings()
1016
{
11-
ImageComparisonSettings.TargetWidth = 512;
12-
ImageComparisonSettings.TargetHeight = 512;
17+
ImageComparisonSettings.TargetWidth = 960;
18+
ImageComparisonSettings.TargetHeight = 540;
1319
ImageComparisonSettings.AverageCorrectnessThreshold = 0.005f;
1420
ImageComparisonSettings.PerPixelCorrectnessThreshold = 0.001f;
1521
ImageComparisonSettings.UseBackBuffer = false;

TestProjects/HDRPUTS_GraphicsTest-2019.4/Assets/Tests/HDRPUTS_GraphicsTests/HDRPUTS_GraphicsTests.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,7 @@ public IEnumerator Run(GraphicsTestCase testCase)
7777
bool allocatesMemory = false;
7878
var mainCamera = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<Camera>();
7979

80-
// 2D Renderer is currently allocating memory, skip it as it will always fail GC alloc tests.
81-
//var additionalCameraData = mainCamera.GetHDRPAdditionalCameraData();
82-
bool is2DRenderer = false; // additionalCameraData.scriptableRenderer is Renderer2D;
83-
84-
if (!is2DRenderer)
80+
if (settings == null || settings.CheckMemoryAllocation)
8581
{
8682
try
8783
{
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
m_EditorVersion: 2019.4.29f1
2-
m_EditorVersionWithRevision: 2019.4.29f1 (0eeae20b1d82)
1+
m_EditorVersion: 2019.4.21f1
2+
m_EditorVersionWithRevision: 2019.4.21f1 (b76dac84db26)

TestProjects/HDRPUTS_GraphicsTest-2020.3/Assets/Tests/HDRPUTS_GraphicsTests/HDRPUTS_GraphicsTestSettings.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,17 @@ namespace Tests
55
public class HDRPUTS_GraphicsTestSettings : GraphicsTestSettings
66
{
77
public int WaitFrames = 0;
8+
public bool XRCompatible = true;
9+
#if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX
10+
public bool CheckMemoryAllocation = false;
11+
#else
12+
public bool CheckMemoryAllocation = true;
13+
#endif //#if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX
814

915
public HDRPUTS_GraphicsTestSettings()
1016
{
11-
ImageComparisonSettings.TargetWidth = 512;
12-
ImageComparisonSettings.TargetHeight = 512;
17+
ImageComparisonSettings.TargetWidth = 960;
18+
ImageComparisonSettings.TargetHeight = 540;
1319
ImageComparisonSettings.AverageCorrectnessThreshold = 0.005f;
1420
ImageComparisonSettings.PerPixelCorrectnessThreshold = 0.001f;
1521
ImageComparisonSettings.UseBackBuffer = false;

TestProjects/HDRPUTS_GraphicsTest-2020.3/Assets/Tests/HDRPUTS_GraphicsTests/HDRPUTS_GraphicsTests.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,7 @@ public IEnumerator Run(GraphicsTestCase testCase)
7777
bool allocatesMemory = false;
7878
var mainCamera = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<Camera>();
7979

80-
// 2D Renderer is currently allocating memory, skip it as it will always fail GC alloc tests.
81-
//var additionalCameraData = mainCamera.GetHDRPAdditionalCameraData();
82-
bool is2DRenderer = false; // additionalCameraData.scriptableRenderer is Renderer2D;
83-
84-
if (!is2DRenderer)
80+
if (settings == null || settings.CheckMemoryAllocation)
8581
{
8682
try
8783
{

TestProjects/HDRPUTS_GraphicsTest-2021.2/Assets/Tests/HDRPUTS_GraphicsTests/HDRPUTS_GraphicsTestSettings.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,20 @@ namespace Tests
55
public class HDRPUTS_GraphicsTestSettings : GraphicsTestSettings
66
{
77
public int WaitFrames = 0;
8+
public bool XRCompatible = true;
9+
#if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX
10+
public bool CheckMemoryAllocation = false;
11+
#else
12+
public bool CheckMemoryAllocation = true;
13+
#endif //#if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX
814

915
public HDRPUTS_GraphicsTestSettings()
1016
{
11-
ImageComparisonSettings.TargetWidth = 512;
12-
ImageComparisonSettings.TargetHeight = 512;
17+
ImageComparisonSettings.TargetWidth = 960;
18+
ImageComparisonSettings.TargetHeight = 540;
1319
ImageComparisonSettings.AverageCorrectnessThreshold = 0.005f;
1420
ImageComparisonSettings.PerPixelCorrectnessThreshold = 0.001f;
1521
ImageComparisonSettings.UseBackBuffer = false;
1622
}
1723
}
18-
}
24+
}

TestProjects/HDRPUTS_GraphicsTest-2021.2/Assets/Tests/HDRPUTS_GraphicsTests/HDRPUTS_GraphicsTests.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,7 @@ public IEnumerator Run(GraphicsTestCase testCase)
7777
bool allocatesMemory = false;
7878
var mainCamera = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<Camera>();
7979

80-
// 2D Renderer is currently allocating memory, skip it as it will always fail GC alloc tests.
81-
//var additionalCameraData = mainCamera.GetHDRPAdditionalCameraData();
82-
bool is2DRenderer = false; // additionalCameraData.scriptableRenderer is Renderer2D;
83-
84-
if (!is2DRenderer)
80+
if (settings == null || settings.CheckMemoryAllocation)
8581
{
8682
try
8783
{

TestProjects/UniversalUTS_GraphicsTest-2019.4/Assets/Tests/UniversalUTS_GraphicsTests/UniversalUTS_GraphicsTestSettings.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,21 @@ namespace Tests
55
public class UniversalUTS_GraphicsTestSettings : GraphicsTestSettings
66
{
77
public int WaitFrames = 0;
8+
public bool XRCompatible = true;
9+
#if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX
10+
public bool CheckMemoryAllocation = false;
11+
#else
12+
public bool CheckMemoryAllocation = true;
13+
#endif //#if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX
814

915
public UniversalUTS_GraphicsTestSettings()
1016
{
11-
ImageComparisonSettings.TargetWidth = 512;
12-
ImageComparisonSettings.TargetHeight = 512;
17+
ImageComparisonSettings.TargetWidth = 960;
18+
ImageComparisonSettings.TargetHeight = 540;
1319
ImageComparisonSettings.AverageCorrectnessThreshold = 0.005f;
1420
ImageComparisonSettings.PerPixelCorrectnessThreshold = 0.001f;
1521
ImageComparisonSettings.UseBackBuffer = false;
22+
ImageComparisonSettings.UseBackBuffer = false;
1623
}
1724
}
1825
}

0 commit comments

Comments
 (0)