From 15a227d57ffa9af161d87cd2504fc0b47ddc7b7a Mon Sep 17 00:00:00 2001 From: ryanhy Date: Thu, 20 Jun 2019 16:42:01 -0700 Subject: [PATCH] use prebuild for everything to avoid asset import issues in other scripts. --- .../Tests/CommonAssets/Scripts/GraphicsTests.cs | 2 +- .../Tests/CommonAssets/Scripts/Setup/Setup.cs | 10 ---------- .../CommonAssets/Scripts/Setup/Setup.cs.meta | 11 ----------- .../CommonAssets/Scripts/Setup/SetupTests.cs | 15 +++++++++++++++ 4 files changed, 16 insertions(+), 22 deletions(-) delete mode 100644 GraphicsTests/LightweightRenderer/Assets/Tests/CommonAssets/Scripts/Setup/Setup.cs delete mode 100644 GraphicsTests/LightweightRenderer/Assets/Tests/CommonAssets/Scripts/Setup/Setup.cs.meta create mode 100644 GraphicsTests/LightweightRenderer/Assets/Tests/CommonAssets/Scripts/Setup/SetupTests.cs diff --git a/GraphicsTests/LightweightRenderer/Assets/Tests/CommonAssets/Scripts/GraphicsTests.cs b/GraphicsTests/LightweightRenderer/Assets/Tests/CommonAssets/Scripts/GraphicsTests.cs index 0a2d868f..b94eb10a 100644 --- a/GraphicsTests/LightweightRenderer/Assets/Tests/CommonAssets/Scripts/GraphicsTests.cs +++ b/GraphicsTests/LightweightRenderer/Assets/Tests/CommonAssets/Scripts/GraphicsTests.cs @@ -26,7 +26,7 @@ public class GraphicsTests [UnityTest] [UseGraphicsTestCases] - [PrebuildSetup(("UnityEditor.TestTools.Graphics.SetupGraphicsTestCases"))] + [PrebuildSetup("SetupTests")] public IEnumerator Test1(GraphicsTestCase testCase) { SceneManager.LoadScene(testCase.ScenePath); diff --git a/GraphicsTests/LightweightRenderer/Assets/Tests/CommonAssets/Scripts/Setup/Setup.cs b/GraphicsTests/LightweightRenderer/Assets/Tests/CommonAssets/Scripts/Setup/Setup.cs deleted file mode 100644 index 9e723e7c..00000000 --- a/GraphicsTests/LightweightRenderer/Assets/Tests/CommonAssets/Scripts/Setup/Setup.cs +++ /dev/null @@ -1,10 +0,0 @@ -using UnityEditor.TestTools.ConfigManager; - -public static class Setup -{ - public static void SetupAll() - { - new EnablePlatformPrebuildStep().Setup(); - ImageHandlingSetup.Setup(); - } -} \ No newline at end of file diff --git a/GraphicsTests/LightweightRenderer/Assets/Tests/CommonAssets/Scripts/Setup/Setup.cs.meta b/GraphicsTests/LightweightRenderer/Assets/Tests/CommonAssets/Scripts/Setup/Setup.cs.meta deleted file mode 100644 index ed2cb94c..00000000 --- a/GraphicsTests/LightweightRenderer/Assets/Tests/CommonAssets/Scripts/Setup/Setup.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 68bbd181050a944408e145cdfb1f7091 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/GraphicsTests/LightweightRenderer/Assets/Tests/CommonAssets/Scripts/Setup/SetupTests.cs b/GraphicsTests/LightweightRenderer/Assets/Tests/CommonAssets/Scripts/Setup/SetupTests.cs new file mode 100644 index 00000000..8e04a72d --- /dev/null +++ b/GraphicsTests/LightweightRenderer/Assets/Tests/CommonAssets/Scripts/Setup/SetupTests.cs @@ -0,0 +1,15 @@ +using UnityEditor; +using UnityEditor.TestTools.Graphics; +using UnityEditor.TestTools.ConfigManager; +using UnityEngine; +using UnityEngine.TestTools; + +public class SetupTests : IPrebuildSetup +{ + public void Setup() + { + new EnablePlatformPrebuildStep().Setup(); + ImageHandlingSetup.Setup(); + new SetupGraphicsTestCases().Setup(); + } +} \ No newline at end of file