浏览代码

Update graphics test framework to work with new folder structure

/main
Peter Bay Bastian 7 年前
当前提交
2cd62598
共有 4 个文件被更改,包括 34 次插入9 次删除
  1. 23
      SampleScenes/LightweightPipeline/LightweightBasicScene.unity
  2. 11
      Tests/GraphicsTests/Framework/Editor/TestFramework.cs
  3. 0
      SRPMARKER
  4. 9
      SRPMARKER.meta

23
SampleScenes/LightweightPipeline/LightweightBasicScene.unity


m_ReflectionIntensity: 0.5
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.091603205, g: 0.113415994, b: 0.14733817, a: 0.5}
m_IndirectSpecularColor: {r: 0.32379833, g: 0.35976756, b: 0.40908688, a: 0.5}
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0

m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1084503476}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 766, y: 376.5, z: 0}
m_LocalScale: {x: 1.915, y: 1.915, z: 1.915}
m_LocalPosition: {x: 711.5, y: 651.5, z: 0}
m_LocalScale: {x: 1.77875, y: 1.77875, z: 1.77875}
m_Children:
- {fileID: 1177504218}
m_Father: {fileID: 0}

m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1177504217}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -237, y: -148.80574, z: 0}
m_LocalPosition: {x: -237, y: -318.46848, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1084503480}

- component: {fileID: 1447851828}
- component: {fileID: 1447851827}
- component: {fileID: 1447851826}
- component: {fileID: 1447851831}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera

m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10

m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 38.69, y: 0.47, z: 0}
--- !u!114 &1447851831
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1447851825}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 06c0317e0632e6c47bb855ee99f95544, type: 3}
m_Name:
m_EditorClassIdentifier:
renderPipelineAsset: {fileID: 11400000, guid: e6987eea1dd29074597d54ed91a54a26,
type: 2}
--- !u!1 &1449522778
GameObject:
m_ObjectHideFlags: 0

11
Tests/GraphicsTests/Framework/Editor/TestFramework.cs


{
public class GraphicsTests
{
static readonly string s_RootPath = Directory.GetParent(Directory.GetFiles(Application.dataPath, "SRPMARKER", SearchOption.AllDirectories).First()).ToString();
// path where the tests live
private static readonly string[] s_Path =
{

{
get
{
var absoluteScenesPath = s_Path.Aggregate(Application.dataPath, Path.Combine);
var absoluteScenesPath = s_Path.Aggregate(s_RootPath, Path.Combine);
foreach (var pipelinePath in s_PipelinePath)
{

[UnityTest]
public IEnumerator TestScene([ValueSource(typeof(CollectScenes), "scenes")]TestInfo testInfo)
{
var prjRelativeGraphsPath = s_Path.Aggregate("Assets", Path.Combine);
var prjRelativeGraphsPath = s_Path.Aggregate(s_RootPath, Path.Combine);
var filePath = Path.Combine(prjRelativeGraphsPath, testInfo.relativePath);
// open the scene

captured.ReadPixels(new Rect(0, 0, testSetup.width, testSetup.height), 0, 0);
RenderTexture.active = oldActive;
var rootPath = Directory.GetParent(Application.dataPath).ToString();
var templatePath = Path.Combine(rootPath.ToString(), "ImageTemplates");
var templatePath = Path.Combine(s_RootPath, "ImageTemplates");
// find the reference image
var dumpFileLocation = Path.Combine(templatePath, string.Format("{0}.{1}", testInfo.relativePath, "png"));

if (!areEqual)
{
var failedPath = Path.Combine(rootPath.ToString(), "Failed");
var failedPath = Path.Combine(Directory.GetParent(Application.dataPath).ToString(), "SRP_Failed");
Directory.CreateDirectory(failedPath);
var misMatchLocationResult = Path.Combine(failedPath, string.Format("{0}.{1}", testInfo.name, "png"));
var misMatchLocationTemplate = Path.Combine(failedPath, string.Format("{0}.template.{1}", testInfo.name, "png"));

0
SRPMARKER

9
SRPMARKER.meta


fileFormatVersion: 2
guid: 8e8e543afe5f6fa41836eebe9e8446a7
timeCreated: 1504175310
licenseType: Pro
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存