Skip to content

Commit 64b14b2

Browse files
committed
test: add back pointcloud mock on CI runs
- to make it work, make sure pointcoud mocks are tested first.
1 parent 563b368 commit 64b14b2

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

test/image/compare_pixels_test.js

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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,32 @@ 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 modules rely on gl-shader@4.2.0,
139+
* we suspect that 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+
149+
return a.indexOf(root) < b.indexOf(root);
150+
}
151+
135152
function runInBatch(mockList) {
136153
var running = 0;
137154

0 commit comments

Comments
 (0)