|
@@ -14,76 +14,102 @@
|
|
|
|
|
|
-- Fast check for a sample which doesn't have a dedicated test script
|
|
-- Fast check for a sample which doesn't have a dedicated test script
|
|
function FastCheckSample(sampleName)
|
|
function FastCheckSample(sampleName)
|
|
- Print("========= Begin Fast-check " .. sampleName .. " =========")
|
|
|
|
- OpenSample(sampleName)
|
|
|
|
- IdleSeconds(2)
|
|
|
|
- OpenSample(nil)
|
|
|
|
- Print("========= End Fast-check " .. sampleName .. " =========")
|
|
|
|
|
|
+ return function()
|
|
|
|
+ Print("========= Begin Fast-check " .. sampleName .. " =========")
|
|
|
|
+ OpenSample(sampleName)
|
|
|
|
+ IdleSeconds(2)
|
|
|
|
+ OpenSample(nil)
|
|
|
|
+ Print("========= End Fast-check " .. sampleName .. " =========")
|
|
|
|
+ end
|
|
end
|
|
end
|
|
|
|
|
|
-RunScript('scripts/decals.bv.luac')
|
|
|
|
-RunScript('scripts/dynamicdraw.bv.luac')
|
|
|
|
-RunScript('scripts/dynamicmaterialtest.bv.luac')
|
|
|
|
-RunScript('scripts/materialscreenshottests.bv.luac')
|
|
|
|
-RunScript('scripts/materialhotreloadtest.bv.luac')
|
|
|
|
-RunScript('scripts/msaa_rpi_test.bv.luac')
|
|
|
|
-RunScript('scripts/cullingandlod.bv.luac')
|
|
|
|
-RunScript('scripts/multirenderpipeline.bv.luac')
|
|
|
|
-RunScript('scripts/lightculling.bv.luac')
|
|
|
|
-RunScript('scripts/transparenttest.bv.luac')
|
|
|
|
-RunScript('scripts/streamingimagetest.bv.luac')
|
|
|
|
-RunScript('scripts/parallaxtest.bv.luac')
|
|
|
|
-RunScript('scripts/checkerboardtest.bv.luac')
|
|
|
|
-RunScript('scripts/scenereloadsoaktest.bv.luac')
|
|
|
|
-RunScript('scripts/diffusegitest.bv.luac')
|
|
|
|
-RunScript('scripts/arealighttest.bv.luac')
|
|
|
|
-RunScript('scripts/multiscene.bv.luac')
|
|
|
|
-RunScript('scripts/shadowtest.bv.luac')
|
|
|
|
-RunScript('scripts/shadowedbistrotest.bv.luac')
|
|
|
|
-RunScript('scripts/PassTree.bv.luac')
|
|
|
|
|
|
+-- Test helper functions
|
|
|
|
+function random_shuffle(list)
|
|
|
|
+ for i = #list, 2, -1 do
|
|
|
|
+ local j = math.random(i)
|
|
|
|
+ list[i], list[j] = list[j], list[i]
|
|
|
|
+ end
|
|
|
|
+end
|
|
|
|
+
|
|
|
|
+function RunScriptWrapper(name)
|
|
|
|
+ return function() RunScript(name) end
|
|
|
|
+end
|
|
|
|
+
|
|
|
|
+tests= {
|
|
|
|
+ RunScriptWrapper('scripts/decals.bv.luac'),
|
|
|
|
+ RunScriptWrapper('scripts/dynamicdraw.bv.luac'),
|
|
|
|
+ RunScriptWrapper('scripts/dynamicmaterialtest.bv.luac'),
|
|
|
|
+ RunScriptWrapper('scripts/materialscreenshottests.bv.luac'),
|
|
|
|
+ RunScriptWrapper('scripts/materialhotreloadtest.bv.luac'),
|
|
|
|
+ -- RunScriptWrapper('scripts/msaa_rpi_test.bv.luac'), -- seems broken at the moment?
|
|
|
|
+ RunScriptWrapper('scripts/cullingandlod.bv.luac'),
|
|
|
|
+ RunScriptWrapper('scripts/multirenderpipeline.bv.luac'),
|
|
|
|
+ RunScriptWrapper('scripts/lightculling.bv.luac'),
|
|
|
|
+ RunScriptWrapper('scripts/transparenttest.bv.luac'),
|
|
|
|
+ RunScriptWrapper('scripts/streamingimagetest.bv.luac'),
|
|
|
|
+ RunScriptWrapper('scripts/parallaxtest.bv.luac'),
|
|
|
|
+ RunScriptWrapper('scripts/checkerboardtest.bv.luac'),
|
|
|
|
+ RunScriptWrapper('scripts/scenereloadsoaktest.bv.luac'),
|
|
|
|
+ RunScriptWrapper('scripts/diffusegitest.bv.luac'),
|
|
|
|
+ RunScriptWrapper('scripts/arealighttest.bv.luac'),
|
|
|
|
+ RunScriptWrapper('scripts/multiscene.bv.luac'),
|
|
|
|
+ RunScriptWrapper('scripts/shadowtest.bv.luac'),
|
|
|
|
+ RunScriptWrapper('scripts/shadowedbistrotest.bv.luac'),
|
|
|
|
+ RunScriptWrapper('scripts/PassTree.bv.luac'),
|
|
|
|
+
|
|
|
|
+ --Fast checking for the samples which don't have a test. Samples should be removed from this list once they have their own tests
|
|
|
|
|
|
---Fast checking for the samples which don't have a test. Samples should be removed from this list once they have their own tests
|
|
|
|
|
|
+ FastCheckSample('RHI/AlphaToCoverage'),
|
|
|
|
+ FastCheckSample('RHI/AsyncCompute'),
|
|
|
|
+ FastCheckSample('RHI/BindlessPrototype'),
|
|
|
|
+ FastCheckSample('RHI/Compute'),
|
|
|
|
+ FastCheckSample('RHI/CopyQueue'),
|
|
|
|
+ FastCheckSample('RHI/DualSourceBlending'),
|
|
|
|
+ FastCheckSample('RHI/IndirectRendering'),
|
|
|
|
+ FastCheckSample('RHI/InputAssembly'),
|
|
|
|
+ FastCheckSample('RHI/MSAA'),
|
|
|
|
+ FastCheckSample('RHI/MultipleViews'),
|
|
|
|
+ FastCheckSample('RHI/MultiRenderTarget'),
|
|
|
|
+ FastCheckSample('RHI/MultiThread'),
|
|
|
|
+ FastCheckSample('RHI/Queries'),
|
|
|
|
+ FastCheckSample('RHI/SphericalHarmonics'),
|
|
|
|
+ FastCheckSample('RHI/Stencil'),
|
|
|
|
+ FastCheckSample('RHI/Swapchain'),
|
|
|
|
+ FastCheckSample('RHI/Texture'),
|
|
|
|
+ FastCheckSample('RHI/Texture3d'),
|
|
|
|
+ -- FastCheckSample('RHI/TextureArray'), -- seems broken at the moment?
|
|
|
|
+ FastCheckSample('RHI/TextureMap'),
|
|
|
|
+ FastCheckSample('RHI/Triangle'),
|
|
|
|
+ FastCheckSample('RHI/TrianglesConstantBuffer'),
|
|
|
|
+
|
|
|
|
+ FastCheckSample('RPI/AssetLoadTest'),
|
|
|
|
+ FastCheckSample('RPI/AuxGeom'),
|
|
|
|
+ FastCheckSample('RPI/BistroBenchmark'),
|
|
|
|
+ FastCheckSample('RPI/MultiViewSingleSceneAuxGeom'),
|
|
|
|
+ FastCheckSample('RPI/RootConstants'),
|
|
|
|
+ FastCheckSample('RPI/Shading'),
|
|
|
|
+
|
|
|
|
+ FastCheckSample('Features/Bloom'),
|
|
|
|
+ FastCheckSample('Features/DepthOfField'),
|
|
|
|
+ -- FastCheckSample('Features/Exposure'), -- seems broken at the moment?
|
|
|
|
+ FastCheckSample('Features/SkinnedMesh'),
|
|
|
|
+ FastCheckSample('Features/SSAO'),
|
|
|
|
+ FastCheckSample('Features/SSR'),
|
|
|
|
+ FastCheckSample('Features/Tonemapping'),
|
|
|
|
+}
|
|
|
|
|
|
-FastCheckSample('RHI/AlphaToCoverage')
|
|
|
|
-FastCheckSample('RHI/AsyncCompute')
|
|
|
|
-FastCheckSample('RHI/BindlessPrototype')
|
|
|
|
-FastCheckSample('RHI/Compute')
|
|
|
|
-FastCheckSample('RHI/CopyQueue')
|
|
|
|
-FastCheckSample('RHI/DualSourceBlending')
|
|
|
|
-FastCheckSample('RHI/IndirectRendering')
|
|
|
|
-FastCheckSample('RHI/InputAssembly')
|
|
|
|
-FastCheckSample('RHI/MSAA')
|
|
|
|
-FastCheckSample('RHI/MultipleViews')
|
|
|
|
-FastCheckSample('RHI/MultiRenderTarget')
|
|
|
|
-FastCheckSample('RHI/MultiThread')
|
|
|
|
-FastCheckSample('RHI/Queries')
|
|
|
|
if (GetRenderApiName() == "dx12") then
|
|
if (GetRenderApiName() == "dx12") then
|
|
- FastCheckSample('RHI/RayTracing')
|
|
|
|
|
|
+ table.insert(tests, FastCheckSample('RHI/RayTracing'))
|
|
end
|
|
end
|
|
-FastCheckSample('RHI/SphericalHarmonics')
|
|
|
|
-FastCheckSample('RHI/Stencil')
|
|
|
|
|
|
+
|
|
if (GetRenderApiName() ~= "dx12") then
|
|
if (GetRenderApiName() ~= "dx12") then
|
|
- FastCheckSample('RHI/Subpass')
|
|
|
|
|
|
+ table.insert(tests, FastCheckSample('RHI/Subpass'))
|
|
end
|
|
end
|
|
-FastCheckSample('RHI/Swapchain')
|
|
|
|
-FastCheckSample('RHI/Texture')
|
|
|
|
-FastCheckSample('RHI/Texture3d')
|
|
|
|
-FastCheckSample('RHI/TextureArray')
|
|
|
|
-FastCheckSample('RHI/TextureMap')
|
|
|
|
-FastCheckSample('RHI/Triangle')
|
|
|
|
-FastCheckSample('RHI/TrianglesConstantBuffer')
|
|
|
|
|
|
|
|
-FastCheckSample('RPI/AssetLoadTest')
|
|
|
|
-FastCheckSample('RPI/AuxGeom')
|
|
|
|
-FastCheckSample('RPI/BistroBenchmark')
|
|
|
|
-FastCheckSample('RPI/MultiViewSingleSceneAuxGeom')
|
|
|
|
-FastCheckSample('RPI/RootConstants')
|
|
|
|
-FastCheckSample('RPI/Shading')
|
|
|
|
-
|
|
|
|
-FastCheckSample('Features/Bloom')
|
|
|
|
-FastCheckSample('Features/DepthOfField')
|
|
|
|
-FastCheckSample('Features/Exposure')
|
|
|
|
-FastCheckSample('Features/SkinnedMesh')
|
|
|
|
-FastCheckSample('Features/SSAO')
|
|
|
|
-FastCheckSample('Features/SSR')
|
|
|
|
-FastCheckSample('Features/Tonemapping')
|
|
|
|
|
|
+seed = GetRandomTestSeed()
|
|
|
|
+Print("========= Using " .. seed .. " as a random seed to sort the tests =========")
|
|
|
|
+math.randomseed(seed) -- pass a custom seed here
|
|
|
|
+random_shuffle(tests)
|
|
|
|
+for k,test in pairs(tests) do
|
|
|
|
+ test()
|
|
|
|
+end
|