Ejemplo n.º 1
0
        public RenderPipelineAsset GetRenderPipeline()
        {
            RenderPipelineAsset renderPipeline = null;
            Suite suite = SuiteManager.GetSuiteByName(suiteName);                                 // Get current suite

            if (suite != null)                                                                    // If suite was returned
            {
                renderPipeline = suite.groups[activeTestEntry.groupIndex].renderPipelineOverride; // Get the groups override render pipeline
                if (renderPipeline == null)                                                       // if still null fallback to suite default
                {
                    renderPipeline = suite.defaultRenderPipeline;                                 // Apply suite default
                }
            }
            return(renderPipeline);
        }
Ejemplo n.º 2
0
        // Check if Render Pipeline needs to be changed and change if necessary
        public void SetRenderPipeline()
        {
            RenderPipelineAsset renderPipeline = model.settings.renderPipeline; // Get the models render pipeline

            if (renderPipeline == null)                                         // If none found
            {
                Suite suite = SuiteManager.GetSuiteByName(suiteName);           // Get current suite
                if (suite != null)                                              // If suite was returned
                {
                    renderPipeline = suite.defaultRenderPipeline;               // Apply suite default
                }
            }
            RenderPipelineAsset currentRenderPipeline = Common.GetRenderPipeline();

            if (renderPipeline != currentRenderPipeline)
            {
                GraphicsSettings.renderPipelineAsset = renderPipeline;
            }
        }
Ejemplo n.º 3
0
        void CompareBaselineTimestamps(string suiteName, string dateTime)
        {
            System.DateTime cloudTimestamp = System.DateTime.Parse(dateTime);

            if (_suiteBaselineData.Count == 0)                                                                           // TODO - shouldnt add this to pull baselines as has issue with iOS trying to pull baselines for OSX
            {
                Console.Instance.Write(DebugLevel.File, MessageLevel.Log, "Putting " + suiteName + " in the pull list"); // Write to console
                suiteBaselinesPullList.Add(SuiteManager.GetSuiteByName(suiteName));
            }
            else
            {
                int matches = 0;
                foreach (SuiteBaselineData SBD in _suiteBaselineData)
                {
                    if (SBD.suiteName == suiteName && SBD.platform == sysData.Platform && SBD.api == sysData.API)
                    {
                        matches++;
                        System.DateTime localTimestamp = System.DateTime.ParseExact(SBD.suiteTimestamp, Common.dateTimeFormat, null);
                        Console.Instance.Write(DebugLevel.File, MessageLevel.Log, string.Format("Comparing cloud time {0} vs local time {1}", cloudTimestamp, localTimestamp));

                        int timeDiff = cloudTimestamp.CompareTo(localTimestamp);
                        if (timeDiff < 0f)
                        {
                            Console.Instance.Write(DebugLevel.File, MessageLevel.Log, "Cloud Timestamp is old");                              // Write to console
                        }
                        else if (timeDiff > 0f)
                        {
                            Console.Instance.Write(DebugLevel.File, MessageLevel.Log, "Cloud Timestamp is newer, adding " + suiteName + " to pull list");                              // Write to console
                            suiteBaselinesPullList.Add(SuiteManager.GetSuiteByName(suiteName));
                        }
                        else if (timeDiff == 0f)
                        {
                            Console.Instance.Write(DebugLevel.File, MessageLevel.Log, "Cloud Timestamp is the same");                              // Write to console
                        }
                    }
                }

                if (matches == 0)
                {
                    suiteBaselinesPullList.Add(SuiteManager.GetSuiteByName(suiteName));
                }
            }
        }
Ejemplo n.º 4
0
        // Set project settings for this test from TestSettings object
        public void SetTestSettings()
        {
            TestSettings testSettings = model.settings.testSettings;                         // Get the models test settings

            if (testSettings == null)                                                        // If none found
            {
                Suite suite = SuiteManager.GetSuiteByName(suiteName);                        // Get current suite
                if (suite != null)                                                           // If suite was returned
                {
                    testSettings = suite.defaultTestSettings;                                // Apply suite default
                    if (testSettings == null)                                                // If still none found
                    {
                        testSettings = Resources.Load <TestSettings>("DefaultTestSettings"); // Apply default
                    }
                }
            }
            if (testSettings == null)             // If still none found
            {
                return;                           // Fail, return
            }
            Common.SetTestSettings(testSettings); // Set settings
        }