Skip to content

Commit 9479518

Browse files
fixes OpenCV version check on osx + fixes build-debug for cover task + fixes appveyor env test
1 parent 5890acf commit 9479518

File tree

5 files changed

+8
-5
lines changed

5 files changed

+8
-5
lines changed

appveyor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ build: off
6262
test_script:
6363
- node --version
6464
- if "%BUILD_TASK%" == "ENVS" (
65-
cd .\ci\envs &&
65+
cd c:\projects\opencv4nodejs\ci\envs &&
6666
npm install &&
6767
npm test
6868
) else (

ci/envs/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"test": "node ./test.js"
44
},
55
"dependencies": {
6-
"opencv4nodejs": "../"
6+
"opencv4nodejs": "../../"
77
},
88
"opencv4nodejs": {
99
"disableAutoBuild": 1,

install/install.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ process.env['OPENCV4NODEJS_INCLUDES'] = includes.join('\n')
7878
process.env['OPENCV4NODEJS_LIBRARIES'] = libs.join('\n')
7979

8080
const flags = process.env.BINDINGS_DEBUG ? '--jobs max --debug' : '--jobs max'
81-
const child = child_process.exec('node-gyp rebuild ' + flags, {}, function(err, stdout, stderr) {
81+
const nodegypCmd = 'node-gyp rebuild ' + flags
82+
log.info('install', `spawning node gyp process: ${nodegypCmd}`)
83+
const child = child_process.exec(nodegypCmd, {}, function(err, stdout, stderr) {
8284
const _err = err || stderr
8385
if (_err) log.error(_err)
8486
})

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"build": "node-gyp configure build --jobs max",
3535
"rebuild": "node-gyp rebuild --jobs max",
3636
"clean": "node-gyp clean",
37-
"build-debug": "set BINDINGS_DEBUG=1 && node ./install/install.js"
37+
"build-debug": "BINDINGS_DEBUG=true && node ./install/install.js"
3838
},
3939
"gypfile": true,
4040
"dependencies": {

test/tests/index.test.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ describe('cv', () => {
7878

7979
it('OpenCV version should match', () => {
8080
expect((process.env.OPENCV_VERSION || '').substr(0, 5)).to.equal(
81-
process.platform === 'osx' ? `${cv.version.major}` : opencvVersionString
81+
// on osx latest opencv package for major version is installed via brew
82+
process.platform === 'darwin' ? `${cv.version.major}` : opencvVersionString
8283
)
8384
})
8485

0 commit comments

Comments
 (0)