Skip to content

[TEST] pointcloud CI test #1047

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ dependencies:
test:
override:
- npm run test-image
- npm run test-image-gl2d
- npm run test-export
- npm run citest-jasmine
- npm run test-bundle
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"test-jasmine": "karma start test/jasmine/karma.conf.js",
"citest-jasmine": "karma start test/jasmine/karma.ciconf.js",
"test-image": "node tasks/test_image.js",
"test-image-gl2d": "node tasks/test_image.js gl2d_* --queue",
"test-export": "node tasks/test_export.js",
"test-syntax": "node tasks/test_syntax.js",
"test-bundle": "node tasks/test_bundle.js",
Expand Down Expand Up @@ -68,7 +69,7 @@
"gl-plot2d": "^1.1.8",
"gl-plot3d": "^1.5.1",
"gl-pointcloud2d": "^1.0.0",
"gl-scatter2d": "^1.0.5",
"gl-scatter2d": "monfera/gl-scatter2d#with-gl-shader-4-2-1",
"gl-scatter2d-fancy": "^1.1.1",
"gl-scatter3d": "^1.0.4",
"gl-select-box": "^1.0.1",
Expand Down
Binary file modified test/image/baselines/gl2d_10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/gl2d_12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/gl2d_14.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/gl2d_17.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed test/image/baselines/gl2d_22.png
Binary file not shown.
Binary file removed test/image/baselines/gl2d_24.png
Binary file not shown.
Binary file removed test/image/baselines/gl2d_28.png
Binary file not shown.
Binary file removed test/image/baselines/gl2d_30.png
Binary file not shown.
Binary file removed test/image/baselines/gl2d_32.png
Binary file not shown.
Binary file modified test/image/baselines/gl2d_axes_booleans.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/gl2d_axes_labels.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/gl2d_axes_lines.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/gl2d_axes_range_manual.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/gl2d_axes_range_mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/gl2d_axes_range_type.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed test/image/baselines/gl2d_basic_error_bar.png
Binary file not shown.
Binary file removed test/image/baselines/gl2d_bubble_markersize0.png
Binary file not shown.
Binary file not shown.
Binary file added test/image/baselines/gl2d_connect_gaps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/gl2d_date_axes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file removed test/image/baselines/gl2d_error_bar_horizontal.png
Binary file not shown.
Binary file removed test/image/baselines/gl2d_error_bar_style.png
Binary file not shown.
Binary file added test/image/baselines/gl2d_error_bars.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/gl2d_fonts.png
Binary file removed test/image/baselines/gl2d_global_font.png
Diff not rendered.
Binary file removed test/image/baselines/gl2d_legend_inside.png
Diff not rendered.
Binary file removed test/image/baselines/gl2d_legend_labels.png
Diff not rendered.
Binary file removed test/image/baselines/gl2d_legend_outside.png
Diff not rendered.
Binary file removed test/image/baselines/gl2d_legend_style.png
Diff not rendered.
Binary file removed test/image/baselines/gl2d_line_style.png
Diff not rendered.
Binary file modified test/image/baselines/gl2d_multiple_subplots.png
Binary file added test/image/baselines/gl2d_pointcloud-basic.png
Binary file modified test/image/baselines/gl2d_scatter-colorscale-colorbar.png
Binary file modified test/image/baselines/gl2d_scatter-marker-line-colorscales.png
Binary file removed test/image/baselines/gl2d_show_legend.png
Diff not rendered.
Binary file modified test/image/baselines/gl2d_simple_inset.png
Binary file modified test/image/baselines/gl2d_size_margins.png
Binary file modified test/image/baselines/gl2d_stacked_coupled_subplots.png
Binary file modified test/image/baselines/gl2d_stacked_subplots.png
47 changes: 43 additions & 4 deletions test/image/compare_pixels_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,31 @@ var QUEUE_WAIT = 10;
var pattern = process.argv[2];
var mockList = getMockList(pattern);
var isInQueue = (process.argv[3] === '--queue');
var isCI = process.env.CIRCLECI;

if(mockList.length === 0) {
throw new Error('No mocks found with pattern ' + pattern);
}

// filter out untestable mocks if no pattern is specified
if(!pattern) {
console.log('Filtering out untestable mocks\n');
console.log('Filtering out untestable mocks:');
mockList = mockList.filter(untestableFilter);
console.log('\n');
}

// gl2d have limited image-test support
if(pattern === 'gl2d_*') {

if(!isInQueue) {
console.log('WARN: Running gl2d image tests in batch may lead to unwanted results\n');
}

if(isCI) {
console.log('Filtering out multiple-subplot gl2d mocks:');
mockList = mockList.filter(untestableGL2DonCIfilter);
console.log('\n');
}
}

// main
Expand All @@ -81,18 +97,41 @@ else {
*
*/
function untestableFilter(mockName) {
return !(
var cond = !(
mockName === 'font-wishlist' ||
mockName.indexOf('gl2d_') !== -1 ||
mockName.indexOf('mapbox_') !== -1
);

if(!cond) console.log(' -', mockName);

return cond;
}

/* gl2d mocks that have multiple subplots
* can't be generated properly on CircleCI
* at the moment.
*
* For more info see:
* https://github.com/plotly/plotly.js/pull/980
*
*/
function untestableGL2DonCIfilter(mockName) {
var cond = [
'gl2d_multiple_subplots',
'gl2d_simple_inset',
'gl2d_stacked_coupled_subplots',
'gl2d_stacked_subplots'
].indexOf(mockName) === -1;

if(!cond) console.log(' -', mockName);

return cond;
}

function runInBatch(mockList) {
var running = 0;

// remove mapbox mocks if circle ci

test('testing mocks in batch', function(t) {
t.plan(mockList.length);

Expand Down
4 changes: 3 additions & 1 deletion test/image/export_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ var test = require('tape');
var FORMATS = ['svg', 'pdf', 'eps'];

// non-exhaustive list of mocks to test
var DEFAULT_LIST = ['0', 'geo_first', 'gl3d_z-range', 'text_export', 'layout_image'];
var DEFAULT_LIST = [
'0', 'geo_first', 'gl3d_z-range', 'text_export', 'layout_image', 'gl2d_12'
];

// return dimensions [in px]
var WIDTH = 700;
Expand Down
Loading