Commit 5df8e27a by vincent

move mtcnn and uncompressed model tests to tests-legacy

parent 19836c13
let spec_files = ['**/*.test.ts'].concat( let spec_files = ['**/*.test.ts']
process.env.EXCLUDE_UNCOMPRESSED
? ['!**/*.uncompressed.test.ts']
: []
)
// exclude browser tests // exclude browser tests
spec_files = spec_files.concat(['!**/*.browser.test.ts']) spec_files = spec_files.concat(['!**/*.browser.test.ts'])
spec_files = spec_files.concat(['!test/tests.legacy/*'])
module.exports = { module.exports = {
spec_dir: 'test', spec_dir: 'test',
......
...@@ -22,24 +22,17 @@ let exclude = ( ...@@ -22,24 +22,17 @@ let exclude = (
'faceLandmarkNet', 'faceLandmarkNet',
'faceRecognitionNet', 'faceRecognitionNet',
'ssdMobilenetv1', 'ssdMobilenetv1',
'tinyFaceDetector', 'tinyFaceDetector'
'mtcnn'
] ]
: [] : []
) )
.filter(ex => ex !== process.env.UUT) .filter(ex => ex !== process.env.UUT)
.map(ex => `test/tests/${ex}/*.ts`) .map(ex => `test/tests/${ex}/*.ts`)
exclude = exclude.concat(
process.env.EXCLUDE_UNCOMPRESSED
? ['**/*.uncompressed.test.ts']
: []
)
// exclude nodejs tests // exclude nodejs tests
exclude = exclude.concat(['**/*.node.test.ts']) exclude = exclude.concat(['**/*.node.test.ts'])
exclude = exclude.concat(['test/env.node.ts']) exclude = exclude.concat(['test/env.node.ts'])
exclude = exclude.concat(['test/tests-legacy/**/*.ts'])
module.exports = function(config) { module.exports = function(config) {
......
...@@ -11,22 +11,16 @@ ...@@ -11,22 +11,16 @@
"tsc": "tsc", "tsc": "tsc",
"tsc-es6": "tsc --p tsconfig.es6.json", "tsc-es6": "tsc --p tsconfig.es6.json",
"build": "rm -rf ./build && rm -rf ./dist && npm run rollup && npm run rollup-min && npm run tsc && npm run tsc-es6", "build": "rm -rf ./build && rm -rf ./dist && npm run rollup && npm run rollup-min && npm run tsc && npm run tsc-es6",
"test": "karma start", "test": "npm run test-browser && npm run test-node",
"test-browser": "karma start --single-run", "test-browser": "karma start --single-run",
"test-node": "ts-node -r ./test/env.node.ts node_modules/jasmine/bin/jasmine --config=jasmine-node.js", "test-node": "ts-node -r ./test/env.node.ts node_modules/jasmine/bin/jasmine --config=jasmine-node.js",
"test-all": "npm run test-browser-exclude-uncompressed && npm run test-node-exclude-uncompressed",
"test-all-include-uncompressed": "npm run test-browser && npm run test-node",
"test-facelandmarknets": "set UUT=faceLandmarkNet&& karma start", "test-facelandmarknets": "set UUT=faceLandmarkNet&& karma start",
"test-facerecognitionnet": "set UUT=faceRecognitionNet&& karma start", "test-facerecognitionnet": "set UUT=faceRecognitionNet&& karma start",
"test-agegendernet": "set UUT=ageGenderNet&& karma start", "test-agegendernet": "set UUT=ageGenderNet&& karma start",
"test-ssdmobilenetv1": "set UUT=ssdMobilenetv1&& karma start", "test-ssdmobilenetv1": "set UUT=ssdMobilenetv1&& karma start",
"test-tinyfacedetector": "set UUT=tinyFaceDetector&& karma start", "test-tinyfacedetector": "set UUT=tinyFaceDetector&& karma start",
"test-globalapi": "set UUT=globalApi&& karma start", "test-globalapi": "set UUT=globalApi&& karma start",
"test-mtcnn": "set UUT=mtcnn&& karma start",
"test-cpu": "set BACKEND_CPU=true&& karma start", "test-cpu": "set BACKEND_CPU=true&& karma start",
"test-exclude-uncompressed": "set EXCLUDE_UNCOMPRESSED=true&& karma start",
"test-browser-exclude-uncompressed": "set EXCLUDE_UNCOMPRESSED=true&& karma start --single-run",
"test-node-exclude-uncompressed": "set EXCLUDE_UNCOMPRESSED=true&& npm run test-node",
"docs": "typedoc --options ./typedoc.config.js ./src" "docs": "typedoc --options ./typedoc.config.js ./src"
}, },
"keywords": [ "keywords": [
......
import { FaceLandmarks68, Point } from '../../../src'; import { FaceLandmarks68, Point } from '../../src';
import { getTestEnv } from '../../env'; import { getTestEnv } from '../env';
import { describeWithBackend, describeWithNets, expectPointClose } from '../../utils'; import { describeWithBackend, describeWithNets, expectPointClose } from '../utils';
describeWithBackend('faceLandmark68Net, uncompressed', () => { describeWithBackend('faceLandmark68Net, uncompressed', () => {
......
import { Point } from '../../../src'; import { Point } from '../../src';
import { FaceLandmarks68 } from '../../../src/classes/FaceLandmarks68'; import { FaceLandmarks68 } from '../../src/classes/FaceLandmarks68';
import { getTestEnv } from '../../env'; import { getTestEnv } from '../env';
import { describeWithBackend, describeWithNets, expectPointClose } from '../../utils'; import { describeWithBackend, describeWithNets, expectPointClose } from '../utils';
describeWithBackend('faceLandmark68TinyNet, uncompressed', () => { describeWithBackend('faceLandmark68TinyNet, uncompressed', () => {
......
import { createCanvasFromMedia, euclideanDistance } from '../../../src'; import { createCanvasFromMedia, euclideanDistance } from '../../src';
import { getTestEnv } from '../../env'; import { getTestEnv } from '../env';
import { describeWithBackend, describeWithNets } from '../../utils'; import { describeWithBackend, describeWithNets } from '../utils';
describeWithBackend('faceRecognitionNet, uncompressed', () => { describeWithBackend('faceRecognitionNet, uncompressed', () => {
......
import * as faceapi from '../../../src'; import * as faceapi from '../../src';
import { getTestEnv } from '../../env'; import { getTestEnv } from '../env';
import { expectFaceDetections } from '../../expectFaceDetections'; import { expectFaceDetections } from '../expectFaceDetections';
import { describeWithBackend, describeWithNets } from '../../utils'; import { describeWithBackend, describeWithNets } from '../utils';
import { expectedSsdBoxes } from './expectedBoxes'; import { expectedSsdBoxes } from '../tests/ssdMobilenetv1/expectedBoxes';
describeWithBackend('ssdMobilenetv1.locateFaces, uncompressed', () => { describeWithBackend('ssdMobilenetv1.locateFaces, uncompressed', () => {
......
...@@ -3,7 +3,7 @@ import { fetchNetWeights } from '../../../src'; ...@@ -3,7 +3,7 @@ import { fetchNetWeights } from '../../../src';
describe('fetchNetWeights', () => { describe('fetchNetWeights', () => {
it('fetches .weights file', async () => { it('fetches .weights file', async () => {
const url = 'test/data/dummy.weights' const url = 'base/test/data/dummy.weights'
const weights = await fetchNetWeights(url) const weights = await fetchNetWeights(url)
expect(weights instanceof Float32Array).toBe(true) expect(weights instanceof Float32Array).toBe(true)
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment