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

Commit

Permalink
Merge 8102c1d into f4cf03d
Browse files Browse the repository at this point in the history
  • Loading branch information
imurchie committed Dec 10, 2019
2 parents f4cf03d + 8102c1d commit a5fc377
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 12 deletions.
20 changes: 13 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ node_js:
addons:
apt:
sources:
- llvm-toolchain-r-test
- ubuntu-toolchain-r-test
packages:
- clang-5.0
cache:
npm: false
directories:
- "$(npm root -g)"
env:
global:
- CXX=clang++-5.0
Expand All @@ -22,13 +24,17 @@ install:
# on node 12 opencv4nodejs and mjpeg-consumer cannot be installed
# also handle possible travis caching
- if [[ `node --version` != v12* ]]; then
printf "while [ true ]; do\nsleep 30\necho 'Building OpenCV'\ndone" > ping.sh;
bash ping.sh &
echo $! > ping.pid;
npm install -g opencv4nodejs > /dev/null 2>&1;
kill `cat ping.pid`;
if [[ $(npm ls --depth 1 -g opencv4nodejs) =~ "── opencv4nodejs@" ]]; then
echo 'Already installed opencv4nodejs';
else
npm install -g opencv4nodejs;
fi

npm install -g mjpeg-consumer;
if [[ $(npm ls --depth 1 -g mjpeg-consumer) =~ "── mjpeg-consumer@" ]]; then
echo 'Already have mjpeg-consumer';
else
npm install -g mjpeg-consumer;
fi
fi
- npm install
script:
Expand Down
1 change: 1 addition & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ boilerplate({
files: [
'./build/test/**/*-specs.js',
'!./build/test/assets/**',
'!./build/test/images/**',
'!./build/test/**/*-e2e-specs.js'
],
verbose: true,
Expand Down
4 changes: 2 additions & 2 deletions lib/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ async function requirePackage (packageName) {
log.debug(`Loading local package '${packageName}'`);
return require(packageName);
} catch (err) {
log.debug(`Failed to load package '${packageName}': ${err.message}`);
log.debug(`Failed to load local package '${packageName}': ${err.message}`);
await linkGlobalPackage(packageName);
}
try {
log.debug(`Retrying load of local package '${packageName}'`);
log.debug(`Retrying load of linked package '${packageName}'`);
return require(packageName);
} catch (err) {
log.errorAndThrow(`Unable to load package '${packageName}': ${err.message}`);
Expand Down
8 changes: 6 additions & 2 deletions test/fs-specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ import { exec } from 'teen_process';
import B from 'bluebird';


let should = chai.should();
const should = chai.should();

const MOCHA_TIMEOUT = 10000;

describe('fs', function () {
this.timeout(MOCHA_TIMEOUT);

const existingPath = path.resolve(__dirname, 'fs-specs.js');
it('should exist', function () {
should.exist(fs);
Expand Down Expand Up @@ -155,7 +159,7 @@ describe('fs', function () {
inCallback.should.equal(0);
filePath.should.not.be.null;
});
it('walkDir all elements recursive', async function () {
it('should walk all elements recursive', async function () {
let inCallback = 0;
const filePath = await fs.walkDir(__dirname, true, async () => {
++inCallback;
Expand Down
2 changes: 1 addition & 1 deletion test/image-util-e2e-specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe('image-util', function () {
});

describe('getImagesMatches', function () {
it.only('should calculate the number of matches between two images', async function () { // eslint-disable-line
it('should calculate the number of matches between two images', async function () {
for (const detectorName of ['AKAZE', 'ORB']) {
const {count, totalCount} = await getImagesMatches(fullImage, fullImage, {detectorName});
count.should.be.above(0);
Expand Down

0 comments on commit a5fc377

Please sign in to comment.