SceneReloadSoakTest.bv.lua 1.4 KB

123456789101112131415161718192021222324252627282930313233
  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. g_screenshotOutputFolder = ResolvePath('@user@/Scripts/Screenshots/SceneReloadSoakTest/')
  12. Print('Saving screenshots to ' .. NormalizePath(g_screenshotOutputFolder))
  13. -- First we capture a screenshot to make sure everything is rendering correctly...
  14. LockFrameTime(1/30) -- frame lock on to get a consistent result
  15. OpenSample('RPI/SceneReloadSoakTest')
  16. ResizeViewport(500, 500)
  17. NoClipCameraController_SetFov(DegToRad(90))
  18. IdleSeconds(1.0)
  19. SelectImageComparisonToleranceLevel("Level G")
  20. CaptureScreenshot(g_screenshotOutputFolder .. 'screenshot.png')
  21. -- Unlock the frame time now that we have our screen capture, so the actual "soaking" can happen at a natural rate
  22. UnlockFrameTime()
  23. -- We let the soak test run for just a few seconds just to make sure things don't fail right away.
  24. -- Note that a true test of the system would be to let the soak run for more like 5 minutes
  25. -- without failure, but that would be too long for our normal per-check-in test suite. We could do
  26. -- that as part of a manual LKG test suite.
  27. IdleSeconds(5.0)
  28. OpenSample(nil)