Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ class RuntimeProfilerTestBase
[SetUp]
public void Setup()
{
#if UNITY_EDITOR
if (!UnityEditor.PlayerSettings.enableFrameTimingStats)
if (!FrameTimingManager.IsFeatureEnabled())
Assert.Ignore("Frame timing stats are disabled in Player Settings, skipping test.");
#endif

// HACK #1 - really shouldn't have to do this here, but previous tests are leaking gameobjects
var objects = GameObject.FindObjectsOfType<GameObject>();
Expand All @@ -48,15 +46,13 @@ public void TearDown()
protected IEnumerator Warmup()
{
for (int i = 0; i < k_NumWarmupFrames; i++)
yield return new WaitForEndOfFrame();
yield return null;

m_DebugFrameTiming.Reset();
}
}

// FIXME: Tests are disabled in player builds for now, since there's no API that tells whether frame timing is
// enabled or not. Re-enable if that changes.
#if UNITY_EDITOR
[UnityPlatform(exclude = new RuntimePlatform[] { RuntimePlatform.LinuxPlayer, RuntimePlatform.LinuxEditor })] // Disabled on Linux (case 1370861)
class RuntimeProfilerTests : RuntimeProfilerTestBase
{
[UnityTest]
Expand All @@ -70,7 +66,7 @@ public IEnumerator RuntimeProfilerGivesNonZeroOutput()
{
m_DebugFrameTiming.UpdateFrameTiming();
camera.Render();
yield return new WaitForEndOfFrame();
yield return null;
}

Assert.True(
Expand All @@ -80,5 +76,4 @@ public IEnumerator RuntimeProfilerGivesNonZeroOutput()
m_DebugFrameTiming.m_BottleneckHistory.Histogram.PresentLimited > 0);
}
}
#endif
}