SceneReloadSoakTest.bv.lua 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. ----------------------------------------------------------------------------------------------------
  2. --
  3. -- Copyright (c) Contributors to the Open 3D Engine Project.
  4. -- For complete copyright and license terms please see the LICENSE at the root of this distribution.
  5. --
  6. -- SPDX-License-Identifier: Apache-2.0 OR MIT
  7. --
  8. --
  9. --
  10. ----------------------------------------------------------------------------------------------------
  11. RunScript("scripts/TestEnvironment.luac")
  12. g_testCaseFolder = 'SceneReloadSoakTest'
  13. Print('Saving screenshots to ' .. NormalizePath(g_screenshotOutputFolder .. g_testCaseFolder))
  14. -- First we capture a screenshot to make sure everything is rendering correctly...
  15. LockFrameTime(1/30) -- frame lock on to get a consistent result
  16. OpenSample('RPI/SceneReloadSoakTest')
  17. ResizeViewport(500, 500)
  18. NoClipCameraController_SetFov(DegToRad(90))
  19. IdleSeconds(1.0)
  20. SelectImageComparisonToleranceLevel("Level G")
  21. CaptureScreenshot(g_testCaseFolder .. '/screenshot.png')
  22. -- Unlock the frame time now that we have our screen capture, so the actual "soaking" can happen at a natural rate
  23. UnlockFrameTime()
  24. -- We let the soak test run for just a few seconds just to make sure things don't fail right away.
  25. -- Note that a true test of the system would be to let the soak run for more like 5 minutes
  26. -- without failure, but that would be too long for our normal per-check-in test suite. We could do
  27. -- that as part of a manual LKG test suite.
  28. IdleSeconds(5.0)
  29. OpenSample(nil)