1 | 'use strict';
|
2 |
|
3 | const { spawnSync } = require('child_process');
|
4 | const { readdirSync } = require('fs');
|
5 | const { join } = require('path');
|
6 |
|
7 | const files = readdirSync(__dirname).sort();
|
8 | for (const filename of files) {
|
9 | if (filename.startsWith('test-')) {
|
10 | const path = join(__dirname, filename);
|
11 | console.log(`> Running ${filename} ...`);
|
12 | const result = spawnSync(`${process.argv0} ${path}`, {
|
13 | shell: true,
|
14 | stdio: 'inherit',
|
15 | windowsHide: true
|
16 | });
|
17 | if (result.status !== 0)
|
18 | process.exitCode = 1;
|
19 | }
|
20 | }
|