瀏覽代碼

Add a switch to disable some tests depending on the engine

Popov72 4 年之前
父節點
當前提交
fd6e3e3abf
共有 2 個文件被更改,包括 8 次插入1 次删除
  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",
             "title": "Shadows CSM and LODs",
             "playgroundId": "#24HWT9#0",
             "playgroundId": "#24HWT9#0",
-            "referenceImage": "shadowscsmandlod.png"
+            "referenceImage": "shadowscsmandlod.png",
+            "excludedEngines": ["webgl1"]
         },
         },
         {
         {
             "title": "Glow layer and LODs",
             "title": "Glow layer and LODs",

+ 6 - 0
tests/validation/index.html

@@ -36,6 +36,12 @@
 						}
 						}
 
 
 						var recursiveRunTest = function(i) {
 						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() {
 							runTest(i, function() {
 								i++;
 								i++;
 								if (justOnce || i >= config.tests.length) {
 								if (justOnce || i >= config.tests.length) {