File tree Expand file tree Collapse file tree 3 files changed +16
-4
lines changed Expand file tree Collapse file tree 3 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
image=opencv4nodejs-ci:$1 -node$2
3
3
docker build -t $image -f ./Dockerfile --build-arg TAG=$1 --build-arg NODE_MAJOR_VERSION=$2 ../../
4
- docker run -e TEST_MODULE_LIST=$TEST_MODULE_LIST $image
4
+ docker run -e OPENCV_VERSION= $OPENCV_VERSION -e TEST_MODULE_LIST=$TEST_MODULE_LIST $image
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ function getDefaultIncludeDirs() {
14
14
if ( opencvBuild . isWin ( ) ) {
15
15
throw new Error ( 'OPENCV_INCLUDE_DIR has to be defined on windows when auto build is disabled' )
16
16
}
17
- return [ defaultLibDir , defaultIncludeDirOpenCV4 ]
17
+ return [ defaultIncludeDir , defaultIncludeDirOpenCV4 ]
18
18
}
19
19
20
20
function getDefaultLibDir ( ) {
@@ -68,10 +68,10 @@ log.info('install', 'setting the following defines:')
68
68
defines . forEach ( def => log . info ( 'defines' , def ) )
69
69
console . log ( )
70
70
log . info ( 'install' , 'setting the following includes:' )
71
- includes . forEach ( def => log . info ( 'includes' , def ) )
71
+ includes . forEach ( inc => log . info ( 'includes' , inc ) )
72
72
console . log ( )
73
73
log . info ( 'install' , 'setting the following libs:' )
74
- libs . forEach ( def => log . info ( 'libs' , def ) )
74
+ libs . forEach ( lib => log . info ( 'libs' , lib ) )
75
75
76
76
process . env [ 'OPENCV4NODEJS_DEFINES' ] = defines . join ( '\n' )
77
77
process . env [ 'OPENCV4NODEJS_INCLUDES' ] = includes . join ( '\n' )
Original file line number Diff line number Diff line change @@ -64,9 +64,21 @@ describe('cv', () => {
64
64
builtModules = builtModules . filter ( m => m !== 'dnn' )
65
65
}
66
66
67
+ const opencvVersionString = `${ cv . version . major } .${ cv . version . minor } .${ cv . version . revision } `
68
+
69
+ console . log ( 'envs are:' )
70
+ console . log ( 'OPENCV_VERSION:' , process . env . OPENCV_VERSION )
71
+ console . log ( 'TEST_MODULE_LIST:' , process . env . TEST_MODULE_LIST )
72
+ console . log ( 'APPVEYOR_BUILD:' , process . env . APPVEYOR_BUILD )
73
+ console . log ( )
74
+ console . log ( 'OpenCV version is:' , opencvVersionString )
67
75
console . log ( 'compiled with the following modules:' , cv . modules )
68
76
console . log ( 'expected modules to be built:' , builtModules )
69
77
78
+ it ( 'OpenCV version should match' , ( ) => {
79
+ expect ( process . env . OPENCV_VERSION ) . to . equal ( opencvVersionString )
80
+ } )
81
+
70
82
it ( 'all modules should be built' , ( ) => {
71
83
builtModules . forEach ( m => expect ( cv . modules ) . to . have . property ( m ) ) ;
72
84
} )
You can’t perform that action at this time.
0 commit comments