composite-test.js
1.38 KB
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
35
36
37
const {execute, executeLongProcess} = require('./lib/test-helper');
async function run() {
const EXEC = {
'execute': execute,
'executeLongProcess': executeLongProcess,
}
const scripts = [
{ execute: 'executeLongProcess', command: ['npm', 'run', 'helper-test'], retryCount: 1 },
{ execute: 'executeLongProcess', command: ['npm', 'run', 'lint']},
{ execute: 'executeLongProcess', command: ['npm', 'run', 'coverage'] },
{ execute: 'executeLongProcess', command: ['npm', 'run', 'buildertest'] },
{ execute: 'executeLongProcess', command: ['npm', 'run', 'tstest'] },
{ execute: 'executeLongProcess', command: ['npm', 'run', 'region-check'] },
{ execute: 'executeLongProcess', command: ['npm', 'run', 'translate-api-test'] },
{ execute: 'executeLongProcess', command: ['npm', 'run', 'typings-generator-test'] },
{ execute: 'executeLongProcess', command: ['npm', 'run', 'browsertest'] },
{ execute: 'executeLongProcess', command: ['npm', 'run', 'react-native-test'] },
{ execute: 'executeLongProcess', command: ['npm', 'run', 'csm-functional-test'] }
];
for (const { execute, command, execOptions, retryCount } of scripts) {
try {
await EXEC[execute](command, execOptions, retryCount);
} catch (error) {
throw error;
}
}
}
(async () => {
try {
await run();
} catch (e) {
console.log(e);
process.exit(1);
}
})();