File tree Expand file tree Collapse file tree 4 files changed +35
-0
lines changed Expand file tree Collapse file tree 4 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ var constants = require ( './util/constants' ) ;
12var common = require ( './util/common' ) ;
23var containerCommands = require ( './util/container_commands' ) ;
34
5+ var msg = [
6+ 'Generating baseline image(s) using build/plotly.js from' ,
7+ common . getTimeLastModified ( constants . pathToPlotlyBuild ) ,
8+ '\n'
9+ ] . join ( ' ' ) ;
10+
411var cmd = containerCommands . getRunCmd (
512 process . env . CIRCLECI ,
613 'node test/image/make_baseline.js ' + process . argv . slice ( 2 ) . join ( ' ' )
714) ;
815
16+ console . log ( msg ) ;
917common . execCmd ( cmd ) ;
Original file line number Diff line number Diff line change 1+ var constants = require ( './util/constants' ) ;
12var common = require ( './util/common' ) ;
23var containerCommands = require ( './util/container_commands' ) ;
34
5+ var msg = [
6+ 'Running image export tests using build/plotly.js from' ,
7+ common . getTimeLastModified ( constants . pathToPlotlyBuild ) ,
8+ '\n'
9+ ] . join ( ' ' ) ;
10+
411var cmd = containerCommands . getRunCmd (
512 process . env . CIRCLECI ,
613 'node test/image/export_test.js ' + process . argv . slice ( 2 ) . join ( ' ' )
714) ;
815
16+ console . log ( msg ) ;
917common . execCmd ( cmd ) ;
Original file line number Diff line number Diff line change 1+ var constants = require ( './util/constants' ) ;
12var common = require ( './util/common' ) ;
23var containerCommands = require ( './util/container_commands' ) ;
34
5+ var msg = [
6+ 'Running image comparison tests using build/plotly.js from' ,
7+ common . getTimeLastModified ( constants . pathToPlotlyBuild ) ,
8+ '\n'
9+ ] . join ( ' ' ) ;
10+
411var cmd = containerCommands . getRunCmd (
512 process . env . CIRCLECI ,
613 'node test/image/compare_pixels_test.js ' + process . argv . slice ( 2 ) . join ( ' ' )
714) ;
815
16+ console . log ( msg ) ;
917common . execCmd ( cmd ) ;
Original file line number Diff line number Diff line change @@ -46,6 +46,17 @@ exports.formatTime = function(date) {
4646 ] . join ( ' ' ) ;
4747} ;
4848
49+ exports . getTimeLastModified = function ( filePath ) {
50+ if ( ! exports . doesFileExist ( filePath ) ) {
51+ throw new Error ( filePath + ' does not exist' ) ;
52+ }
53+
54+ var stats = fs . statSync ( filePath ) ,
55+ formattedTime = exports . formatTime ( stats . mtime ) ;
56+
57+ return formattedTime ;
58+ } ;
59+
4960exports . touch = function ( filePath ) {
5061 fs . closeSync ( fs . openSync ( filePath , 'w' ) ) ;
5162} ;
You can’t perform that action at this time.
0 commit comments