@@ -73,7 +73,9 @@ if(pattern === 'gl2d_*') {
7373
7474 if ( isCI ) {
7575 console . log ( 'Filtering out multiple-subplot gl2d mocks:' ) ;
76- mockList = mockList . filter ( untestableGL2DonCIfilter ) ;
76+ mockList = mockList
77+ . filter ( untestableGL2DonCIfilter )
78+ . sort ( sortForGL2DonCI ) ;
7779 console . log ( '\n' ) ;
7880 }
7981}
@@ -121,17 +123,37 @@ function untestableGL2DonCIfilter(mockName) {
121123 'gl2d_multiple_subplots' ,
122124 'gl2d_simple_inset' ,
123125 'gl2d_stacked_coupled_subplots' ,
124- 'gl2d_stacked_subplots' ,
125-
126- // not sure why this one still fails on CircleCI
127- 'gl2d_pointcloud-basic'
126+ 'gl2d_stacked_subplots'
128127 ] . indexOf ( mockName ) === - 1 ;
129128
130129 if ( ! cond ) console . log ( ' -' , mockName ) ;
131130
132131 return cond ;
133132}
134133
134+ /* gl2d pointcloud mock(s) must be tested first
135+ * on CircleCI in order to work; sort them here.
136+ *
137+ * Pointcloud relies on gl-shader@4.2.1 whereas
138+ * other gl2d trace modules rely on gl-shader@4.2.0,
139+ * we suspect that the lone gl context on CircleCI is
140+ * having issues with dealing with the two different
141+ * gl-shader versions.
142+ *
143+ * More info here:
144+ * https://github.com/plotly/plotly.js/pull/1037
145+ */
146+ function sortForGL2DonCI ( a , b ) {
147+ var root = 'gl2d_pointcloud' ,
148+ ai = a . indexOf ( root ) ,
149+ bi = b . indexOf ( root ) ;
150+
151+ if ( ai < bi ) return 1 ;
152+ if ( ai > bi ) return - 1 ;
153+
154+ return 0 ;
155+ }
156+
135157function runInBatch ( mockList ) {
136158 var running = 0 ;
137159
0 commit comments