Skip to content
This repository was archived by the owner on Oct 18, 2023. It is now read-only.

Commit 5ec7b3b

Browse files
author
Simon Hofmann
committed
Fetched upstream, modified tests build-task to skip Docker and use prebuilt lib
1 parent a4702d7 commit 5ec7b3b

File tree

7 files changed

+29
-6
lines changed

7 files changed

+29
-6
lines changed

ci/cover/cover.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
image=opencv4nodejs-ci:$1-node$2-with-coverage
33
docker build -t $image -f ./Dockerfile --build-arg TAG=$1 --build-arg NODE_MAJOR_VERSION=$2 ../../
4-
docker run -v $PWD/coverage-report:/test/coverage-report $image
4+
docker run -v $PWD/coverage-report:/test/coverage-report -e OPENCV_VERSION=$OPENCV_VERSION -e TEST_MODULE_LIST=$TEST_MODULE_LIST $image

ci/envs/package.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"scripts": {
3+
"test": "node ./test.js"
4+
},
5+
"dependencies": {
6+
"opencv4nodejs": "../../"
7+
},
8+
"opencv4nodejs": {
9+
"disableAutoBuild": 1,
10+
"opencvIncludeDir": "C:\\tools\\opencv\\build\\include",
11+
"opencvLibDir": "C:\\tools\\opencv\\build\\x64\\vc14\\lib",
12+
"opencvBinDir": "C:\\tools\\opencv\\build\\x64\\vc14\\bin"
13+
}
14+
}

ci/envs/test.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
process.env.OPENCV4NODES_DEBUG_REQUIRE = true
2+
3+
if (!require('opencv4nodejs')) {
4+
throw new Error('failed to require opencv4nodejs')
5+
}

ci/test/package-lock.json

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ci/test/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"scripts": {
3-
"test": "bash ./test.sh"
3+
"test": "bash ./script/run-test.sh"
44
}
55
}

ci/test/script/run-test.sh

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
#!/bin/sh
2+
export OPENCV4NODEJS_DISABLE_AUTOBUILD=1
23
echo installing &&\
34
npm install --unsafe-perm &&\
45
echo running tests &&\
5-
cd ./test &&\
6+
cd ../../test &&\
67
npm install --unsafe-perm &&\
7-
npm run test-docker &&\
8-
npm run test-externalMemTracking
8+
npm test &&\
9+
npm run test-externalMemTracking

ci/test/test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
image=opencv4nodejs-ci:$1-node$2
33
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

0 commit comments

Comments
 (0)