Explorar o código

Add a switch to disable some tests depending on the engine

Popov72 %!s(int64=4) %!d(string=hai) anos
pai
achega
fd6e3e3abf
Modificáronse 2 ficheiros con 8 adicións e 1 borrados
  1. 2 1
      tests/validation/config.json
  2. 6 0
      tests/validation/index.html

+ 2 - 1
tests/validation/config.json

@@ -954,7 +954,8 @@
         {
             "title": "Shadows CSM and LODs",
             "playgroundId": "#24HWT9#0",
-            "referenceImage": "shadowscsmandlod.png"
+            "referenceImage": "shadowscsmandlod.png",
+            "excludedEngines": ["webgl1"]
         },
         {
             "title": "Glow layer and LODs",

+ 6 - 0
tests/validation/index.html

@@ -36,6 +36,12 @@
 						}
 
 						var recursiveRunTest = function(i) {
+                            const excludedEngines = config.tests[i].excludedEngines;
+                            const webgl1 = !!window.disableWebGL2Support;
+                            if (Array.isArray(excludedEngines) && (webgl1 && excludedEngines.indexOf("webgl1") >= 0 || !webgl1 && excludedEngines.indexOf("webgl2") >= 0)) {
+                                recursiveRunTest(i + 1);
+                                return;
+                            }
 							runTest(i, function() {
 								i++;
 								if (justOnce || i >= config.tests.length) {