forked from arturadib/node-qt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake.js
More file actions
executable file
·34 lines (28 loc) · 736 Bytes
/
make.js
File metadata and controls
executable file
·34 lines (28 loc) · 736 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env node
try {
require('shelljs/make');
} catch(e) {
console.log('Could not load ShellJS. Did you forget to `npm install`?\n');
process.exit(1);
}
var root = __dirname;
target.test = function() {
cd(root);
echo('_________________________________________________________________');
echo('Running Node-Qt tests');
echo();
cd('test');
rm('-f', 'img-test/*');
ls('q*.js').forEach(function(f) {
echo('Running test file '+f);
exec('node '+f);
});
}
target.ref = function() {
cd(root);
cd('test');
echo('_________________________________________________________________');
echo('Node-Qt tests: Overwriting reference images');
rm('-f', 'img-ref/*');
mv('img-test/*', 'img-ref');
}