1 | const {execute, executeLongProcess} = require('./lib/test-helper');
|
2 |
|
3 | async function run() {
|
4 | const EXEC = {
|
5 | 'execute': execute,
|
6 | 'executeLongProcess': executeLongProcess,
|
7 | }
|
8 | const scripts = [
|
9 | { execute: 'executeLongProcess', command: ['npm', 'run', 'helper-test'], retryCount: 1 },
|
10 | { execute: 'executeLongProcess', command: ['npm', 'run', 'lint']},
|
11 | { execute: 'executeLongProcess', command: ['npm', 'run', 'unit'] },
|
12 | { execute: 'executeLongProcess', command: ['npm', 'run', 'buildertest'] },
|
13 | { execute: 'executeLongProcess', command: ['npm', 'run', 'tstest'] },
|
14 | { execute: 'executeLongProcess', command: ['npm', 'run', 'region-check'] },
|
15 | { execute: 'executeLongProcess', command: ['npm', 'run', 'translate-api-test'] },
|
16 | { execute: 'executeLongProcess', command: ['npm', 'run', 'typings-generator-test'] },
|
17 | { execute: 'executeLongProcess', command: ['npm', 'run', 'browsertest'] },
|
18 | { execute: 'executeLongProcess', command: ['npm', 'run', 'react-native-test'] },
|
19 | { execute: 'executeLongProcess', command: ['npm', 'run', 'csm-functional-test'] }
|
20 | ];
|
21 | for (const { execute, command, execOptions, retryCount } of scripts) {
|
22 | try {
|
23 | await EXEC[execute](command, execOptions, retryCount);
|
24 | } catch (error) {
|
25 | throw error;
|
26 | }
|
27 | }
|
28 | }
|
29 |
|
30 | (async () => {
|
31 | try {
|
32 | await run();
|
33 | } catch (e) {
|
34 | console.log(e);
|
35 | process.exit(1);
|
36 | }
|
37 | })();
|