From 0a2657cb5bff0ff9b2a0ee64cab1d56f26f4eee6 Mon Sep 17 00:00:00 2001 From: Tom Date: Thu, 18 Jan 2024 12:45:27 -0500 Subject: [PATCH] additional test logging for testing travis ci --- src/webgldrawer.js | 3 +++ test/modules/ajax-tiles.js | 12 +++++++----- test/modules/basic.js | 12 +++++++----- test/modules/controls.js | 12 +++++++----- test/modules/drawer.js | 2 +- test/modules/events.js | 12 +++++++----- test/modules/formats.js | 12 +++++++----- test/modules/imageloader.js | 12 +++++++----- test/modules/multi-image.js | 2 ++ test/modules/navigator.js | 12 +++++++----- test/modules/referencestrip.js | 12 +++++++----- test/modules/tiledimage.js | 12 +++++++----- test/modules/tilesource-dynamic-url.js | 12 +++++++----- test/modules/units.js | 12 +++++++----- test/modules/viewport.js | 12 +++++++----- test/modules/world.js | 12 +++++++----- 16 files changed, 97 insertions(+), 66 deletions(-) diff --git a/src/webgldrawer.js b/src/webgldrawer.js index cf051ad3..a67803bf 100644 --- a/src/webgldrawer.js +++ b/src/webgldrawer.js @@ -92,6 +92,7 @@ // for use with qunit tests this._numGlMaxTextureErrors = 0; + this._numGlMaxTextureOks = 0; } @@ -281,6 +282,8 @@ this._numGlMaxTextureErrors += 1; $.console.error(`There was a WebGL problem: bad value for MAX_TEXTURE_IMAGE_UNITS (${maxTextures})`); return; + } else { + this._numGlMaxTextureOks += 1; } let texturePositionArray = new Float32Array(maxTextures * 12); // 6 vertices (2 triangles) x 2 coordinates per vertex let textureDataArray = new Array(maxTextures); diff --git a/test/modules/ajax-tiles.js b/test/modules/ajax-tiles.js index 967b907b..25574ed3 100644 --- a/test/modules/ajax-tiles.js +++ b/test/modules/ajax-tiles.js @@ -54,12 +54,14 @@ }, afterEach: function() { if (viewer){ - let errors = viewer.drawer._numGlMaxTextureErrors; - if(errors > 0){ - console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + let errors = viewer.drawer._numGlMaxTextureErrors; + if(errors > 0){ + console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + } else { + console.log('Num OK draw calls', viewer.drawer._numGlMaxTextureOks); + } + viewer.destroy(); } - viewer.destroy(); - } viewer = null; } diff --git a/test/modules/basic.js b/test/modules/basic.js index ad7234a9..096707f3 100644 --- a/test/modules/basic.js +++ b/test/modules/basic.js @@ -17,12 +17,14 @@ }, afterEach: function () { if (viewer){ - let errors = viewer.drawer._numGlMaxTextureErrors; - if(errors > 0){ - console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + let errors = viewer.drawer._numGlMaxTextureErrors; + if(errors > 0){ + console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + } else { + console.log('Num OK draw calls', viewer.drawer._numGlMaxTextureOks); + } + viewer.destroy(); } - viewer.destroy(); - } viewer = null; } diff --git a/test/modules/controls.js b/test/modules/controls.js index d40fb8d7..1706951d 100644 --- a/test/modules/controls.js +++ b/test/modules/controls.js @@ -17,12 +17,14 @@ }, afterEach: function () { if (viewer){ - let errors = viewer.drawer._numGlMaxTextureErrors; - if(errors > 0){ - console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + let errors = viewer.drawer._numGlMaxTextureErrors; + if(errors > 0){ + console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + } else { + console.log('Num OK draw calls', viewer.drawer._numGlMaxTextureOks); + } + viewer.destroy(); } - viewer.destroy(); - } viewer = null; } diff --git a/test/modules/drawer.js b/test/modules/drawer.js index e9f1466d..c911838e 100644 --- a/test/modules/drawer.js +++ b/test/modules/drawer.js @@ -18,7 +18,7 @@ let errors = viewer.drawer._numGlMaxTextureErrors; if(errors > 0){ console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); - } + } else { console.log('Num OK draw calls', viewer.drawer._numGlMaxTextureOks); } viewer.destroy(); } viewer = null; diff --git a/test/modules/events.js b/test/modules/events.js index f40ed45b..5454b8af 100644 --- a/test/modules/events.js +++ b/test/modules/events.js @@ -18,12 +18,14 @@ }, afterEach: function () { if (viewer){ - let errors = viewer.drawer._numGlMaxTextureErrors; - if(errors > 0){ - console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + let errors = viewer.drawer._numGlMaxTextureErrors; + if(errors > 0){ + console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + } else { + console.log('Num OK draw calls', viewer.drawer._numGlMaxTextureOks); + } + viewer.destroy(); } - viewer.destroy(); - } viewer = null; } } ); diff --git a/test/modules/formats.js b/test/modules/formats.js index 0c499bcf..bb595328 100644 --- a/test/modules/formats.js +++ b/test/modules/formats.js @@ -15,12 +15,14 @@ }, afterEach: function () { if (viewer){ - let errors = viewer.drawer._numGlMaxTextureErrors; - if(errors > 0){ - console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + let errors = viewer.drawer._numGlMaxTextureErrors; + if(errors > 0){ + console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + } else { + console.log('Num OK draw calls', viewer.drawer._numGlMaxTextureOks); + } + viewer.destroy(); } - viewer.destroy(); - } viewer = null; } diff --git a/test/modules/imageloader.js b/test/modules/imageloader.js index 13dc3cbf..ef42165c 100644 --- a/test/modules/imageloader.js +++ b/test/modules/imageloader.js @@ -16,12 +16,14 @@ }, afterEach: function () { if (viewer){ - let errors = viewer.drawer._numGlMaxTextureErrors; - if(errors > 0){ - console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + let errors = viewer.drawer._numGlMaxTextureErrors; + if(errors > 0){ + console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + } else { + console.log('Num OK draw calls', viewer.drawer._numGlMaxTextureOks); + } + viewer.destroy(); } - viewer.destroy(); - } viewer = null; } diff --git a/test/modules/multi-image.js b/test/modules/multi-image.js index 9fc20021..6c356c0a 100644 --- a/test/modules/multi-image.js +++ b/test/modules/multi-image.js @@ -25,6 +25,8 @@ let errors = viewer.drawer._numGlMaxTextureErrors; if(errors > 0){ console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + } else { + console.log('Num OK draw calls', viewer.drawer._numGlMaxTextureOks); } viewer.destroy(); } diff --git a/test/modules/navigator.js b/test/modules/navigator.js index 321b160b..db3fca03 100644 --- a/test/modules/navigator.js +++ b/test/modules/navigator.js @@ -43,12 +43,14 @@ resetTestVariables(); if (viewer){ - let errors = viewer.drawer._numGlMaxTextureErrors; - if(errors > 0){ - console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + let errors = viewer.drawer._numGlMaxTextureErrors; + if(errors > 0){ + console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + } else { + console.log('Num OK draw calls', viewer.drawer._numGlMaxTextureOks); + } + viewer.destroy(); } - viewer.destroy(); - } viewer = null; } diff --git a/test/modules/referencestrip.js b/test/modules/referencestrip.js index 746a37f3..07f18ed5 100644 --- a/test/modules/referencestrip.js +++ b/test/modules/referencestrip.js @@ -11,12 +11,14 @@ }, afterEach: function () { if (viewer){ - let errors = viewer.drawer._numGlMaxTextureErrors; - if(errors > 0){ - console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + let errors = viewer.drawer._numGlMaxTextureErrors; + if(errors > 0){ + console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + } else { + console.log('Num OK draw calls', viewer.drawer._numGlMaxTextureOks); + } + viewer.destroy(); } - viewer.destroy(); - } viewer = null; } diff --git a/test/modules/tiledimage.js b/test/modules/tiledimage.js index e3c046b0..5115d734 100644 --- a/test/modules/tiledimage.js +++ b/test/modules/tiledimage.js @@ -21,12 +21,14 @@ }, afterEach: function() { if (viewer){ - let errors = viewer.drawer._numGlMaxTextureErrors; - if(errors > 0){ - console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + let errors = viewer.drawer._numGlMaxTextureErrors; + if(errors > 0){ + console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + } else { + console.log('Num OK draw calls', viewer.drawer._numGlMaxTextureOks); + } + viewer.destroy(); } - viewer.destroy(); - } viewer = null; } diff --git a/test/modules/tilesource-dynamic-url.js b/test/modules/tilesource-dynamic-url.js index 48b59d71..0ab36223 100644 --- a/test/modules/tilesource-dynamic-url.js +++ b/test/modules/tilesource-dynamic-url.js @@ -137,12 +137,14 @@ ASSERT = null; if (viewer){ - let errors = viewer.drawer._numGlMaxTextureErrors; - if(errors > 0){ - console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + let errors = viewer.drawer._numGlMaxTextureErrors; + if(errors > 0){ + console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + } else { + console.log('Num OK draw calls', viewer.drawer._numGlMaxTextureOks); + } + viewer.destroy(); } - viewer.destroy(); - } viewer = null; diff --git a/test/modules/units.js b/test/modules/units.js index 540e439b..e5181810 100644 --- a/test/modules/units.js +++ b/test/modules/units.js @@ -20,12 +20,14 @@ }, afterEach: function () { if (viewer){ - let errors = viewer.drawer._numGlMaxTextureErrors; - if(errors > 0){ - console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + let errors = viewer.drawer._numGlMaxTextureErrors; + if(errors > 0){ + console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + } else { + console.log('Num OK draw calls', viewer.drawer._numGlMaxTextureOks); + } + viewer.destroy(); } - viewer.destroy(); - } viewer = null; } diff --git a/test/modules/viewport.js b/test/modules/viewport.js index 455def67..49fef2e1 100644 --- a/test/modules/viewport.js +++ b/test/modules/viewport.js @@ -22,12 +22,14 @@ }, afterEach: function () { if (viewer){ - let errors = viewer.drawer._numGlMaxTextureErrors; - if(errors > 0){ - console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + let errors = viewer.drawer._numGlMaxTextureErrors; + if(errors > 0){ + console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + } else { + console.log('Num OK draw calls', viewer.drawer._numGlMaxTextureOks); + } + viewer.destroy(); } - viewer.destroy(); - } viewer = null; } diff --git a/test/modules/world.js b/test/modules/world.js index 6a9b3bb1..9214aa1d 100644 --- a/test/modules/world.js +++ b/test/modules/world.js @@ -17,12 +17,14 @@ }, afterEach: function () { if (viewer){ - let errors = viewer.drawer._numGlMaxTextureErrors; - if(errors > 0){ - console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + let errors = viewer.drawer._numGlMaxTextureErrors; + if(errors > 0){ + console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors); + } else { + console.log('Num OK draw calls', viewer.drawer._numGlMaxTextureOks); + } + viewer.destroy(); } - viewer.destroy(); - } viewer = null; }