فهرست منبع

Fix for auto tests

Popov72 4 سال پیش
والد
کامیت
8049907b09
2فایلهای تغییر یافته به همراه7 افزوده شده و 6 حذف شده
  1. 0 6
      tests/validation/index.html
  2. 7 0
      tests/validation/validation.js

+ 0 - 6
tests/validation/index.html

@@ -36,12 +36,6 @@
 						}
 
 						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) {

+ 7 - 0
tests/validation/validation.js

@@ -160,6 +160,13 @@ function runTest(index, done) {
         done(false);
     }
 
+    const excludedEngines = config.tests[index].excludedEngines;
+    const webgl1 = !!window.disableWebGL2Support;
+    if (Array.isArray(excludedEngines) && (webgl1 && excludedEngines.indexOf("webgl1") >= 0 || !webgl1 && excludedEngines.indexOf("webgl2") >= 0)) {
+        done(false);
+        return;
+    }
+
     // Clear the plugin activated observables in case it is registered in the test.
     BABYLON.SceneLoader.OnPluginActivatedObservable.clear();