@@ -51,8 +51,6 @@ var QUEUE_WAIT = 10;
51
51
var pattern = process . argv [ 2 ] ;
52
52
var mockList = getMockList ( pattern ) ;
53
53
var isInQueue = ( process . argv [ 3 ] === '--queue' ) ;
54
- var isCI = process . env . CIRCLECI ;
55
-
56
54
57
55
if ( mockList . length === 0 ) {
58
56
throw new Error ( 'No mocks found with pattern ' + pattern ) ;
@@ -67,18 +65,12 @@ if(!pattern) {
67
65
68
66
// gl2d have limited image-test support
69
67
if ( pattern === 'gl2d_*' ) {
70
-
71
68
if ( ! isInQueue ) {
72
69
console . log ( 'WARN: Running gl2d image tests in batch may lead to unwanted results\n' ) ;
73
70
}
74
-
75
- if ( isCI ) {
76
- console . log ( 'Filtering out multiple-subplot gl2d mocks:' ) ;
77
- mockList = mockList
78
- . filter ( untestableGL2DonCIfilter )
79
- . sort ( sortForGL2DonCI ) ;
80
- console . log ( '\n' ) ;
81
- }
71
+ console . log ( '\nSorting gl2d mocks to avoid gl-shader conflicts' ) ;
72
+ sortGl2dMockList ( mockList ) ;
73
+ console . log ( '' ) ;
82
74
}
83
75
84
76
// main
@@ -111,48 +103,32 @@ function untestableFilter(mockName) {
111
103
return cond ;
112
104
}
113
105
114
- /* gl2d mocks that have multiple subplots
115
- * can't be generated properly on CircleCI
116
- * at the moment.
117
- *
118
- * For more info see:
119
- * https://github.com/plotly/plotly.js/pull/980
106
+ /* gl2d pointcloud and other non-regl gl2d mock(s)
107
+ * must be tested first on in order to work;
108
+ * sort them here.
120
109
*
121
- */
122
- function untestableGL2DonCIfilter ( mockName ) {
123
- var cond = [
124
- 'gl2d_multiple_subplots' ,
125
- 'gl2d_simple_inset' ,
126
- 'gl2d_stacked_coupled_subplots' ,
127
- 'gl2d_stacked_subplots'
128
- ] . indexOf ( mockName ) === - 1 ;
129
-
130
- if ( ! cond ) console . log ( ' -' , mockName ) ;
131
-
132
- return cond ;
133
- }
134
-
135
- /* gl2d pointcloud mock(s) must be tested first
136
- * on CircleCI in order to work; sort them here.
137
- *
138
- * Pointcloud relies on [email protected] whereas
139
- * other gl2d trace modules rely on [email protected] ,
140
- * we suspect that the lone gl context on CircleCI is
110
+ * gl-shader appears to conflict with regl.
111
+ * We suspect that the lone gl context on CircleCI is
141
112
* having issues with dealing with the two different
142
- * gl-shader versions.
113
+ * program binding algorithm.
114
+ *
115
+ * The problem will be solved by switching all our
116
+ * WebGL-based trace types to regl.
143
117
*
144
118
* More info here:
145
119
* https://github.com/plotly/plotly.js/pull/1037
146
120
*/
147
- function sortForGL2DonCI ( a , b ) {
148
- var root = 'gl2d_pointcloud' ,
149
- ai = a . indexOf ( root ) ,
150
- bi = b . indexOf ( root ) ;
151
-
152
- if ( ai < bi ) return 1 ;
153
- if ( ai > bi ) return - 1 ;
154
-
155
- return 0 ;
121
+ function sortGl2dMockList ( mockList ) {
122
+ var mockNames = [ 'gl2d_pointcloud-basic' , 'gl2d_heatmapgl' ] ;
123
+ var pos = 0 ;
124
+
125
+ mockNames . forEach ( function ( m ) {
126
+ var ind = mockList . indexOf ( m ) ;
127
+ var tmp = mockList [ pos ] ;
128
+ mockList [ pos ] = m ;
129
+ mockList [ ind ] = tmp ;
130
+ pos ++ ;
131
+ } ) ;
156
132
}
157
133
158
134
function runInBatch ( mockList ) {
0 commit comments