test/www: bo duong dan tuyet doi cua may dev

Ba test nay doc app.js/app3d.js qua duong dan cung
/home/quangtrung/projects/vslam_cpp/..., nen chi chay duoc tren dung mot may.
Tren Jetson chung fail voi ENOENT truoc khi chay duoc dong assert nao --
ctest bao fail nhung khong phai vi logic sai.

Dung path.resolve(__dirname, ...) nhu test_scan_frame.js va test_world_mesh.js
trong cung thu muc da lam.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
trung09122002
2026-09-19 17:25:22 +07:00
parent f8a04a2a0b
commit ac7086d26a
3 changed files with 3 additions and 3 deletions

View File

@@ -62,7 +62,7 @@ global.THREE = {
Color: class { constructor() { this.set = () => {}; } },
};
const www = '/home/quangtrung/projects/vslam_cpp/libs/vslam_web/www';
const www = path.resolve(__dirname, '../../libs/vslam_web/www');
const sb = { THREE: global.THREE, console, window: {}, document: {} };
vm.createContext(sb);
vm.runInContext(fs.readFileSync(path.join(www, 'app3d.js'), 'utf8') +