UnitTests + APP_BASE_PATH
This commit is contained in:
@@ -126,6 +126,7 @@ function snapshot(outDir, cam0, cam1, ws){
|
||||
console.log('Taking snapshot from cam0 async');
|
||||
(async () => {
|
||||
try {
|
||||
const BASE_PATH = process.env.APP_BASE_PATH || '/usr/src/app';
|
||||
console.log('Taking snapshot from cam1 a…');
|
||||
await cam0.snapshotHighRes(path.join(outDir, name0));
|
||||
await cam1.snapshotHighRes(path.join(outDir, name1));
|
||||
@@ -134,8 +135,16 @@ function snapshot(outDir, cam0, cam1, ws){
|
||||
strFile0 = path.join(outDir, name0);
|
||||
strFile1 = path.join(outDir, name1);
|
||||
|
||||
//const command = `python3 /usr/src/app/programs/readTwoImages.py -i ${strFile0} -i ${strFile1} -npz /usr/src/app/data/settings/callibration_cam0.npz -npz /usr/src/app/data/settings/callibration_cam1.npz -settings /usr/src/app/data/settings/settings.json`;
|
||||
const command = `python3 /usr/src/app/programs/readTwoImages.py -i ${strFile0} -i ${strFile1} -npz /usr/src/app/data/settings/callibration_cam0.npz -npz /usr/src/app/data/settings/callibration_cam1.npz -settings /usr/src/app/data/settings/settings1m.json`;
|
||||
//const command = `python3 /usr/src/app/programs/readTwoImages.py -i ${strFile0} -i ${strFile1} -npz /usr/src/app/data/settings/callibration_cam0.npz -npz /usr/src/app/data/settings/callibration_cam1.npz -settings /usr/src/app/data/settings/settings1m.json`;
|
||||
|
||||
const command = `python3 ${path.join(BASE_PATH, 'programs/readTwoImages.py')} \
|
||||
-i ${strFile0} \
|
||||
-i ${strFile1} \
|
||||
-npz ${path.join(BASE_PATH, 'data/settings/callibration_cam0.npz')} \
|
||||
-npz ${path.join(BASE_PATH, 'data/settings/callibration_cam1.npz')} \
|
||||
-settings ${path.join(BASE_PATH, 'data/settings/settings1m.json')}`;
|
||||
|
||||
|
||||
console.log("Executing Python " + command);
|
||||
processPython(command, name0, name1, outDir, ws);
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user