Skip to content

Commit f2f02a6

Browse files
filipesilvahansl
authored andcommitted
tests: split required e2e suite (#4528)
1 parent 137a0de commit f2f02a6

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

.travis.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ matrix:
2424
env: SCRIPT=test
2525
- node_js: "6"
2626
os: linux
27-
env: NODE_SCRIPT=tests/run_e2e.js
27+
env: NODE_SCRIPT="tests/run_e2e.js --glob=tests/build/**"
28+
- node_js: "6"
29+
os: linux
30+
env: NODE_SCRIPT="tests/run_e2e.js --ignore=**/tests/build/**"
2831

2932
# Optional builds.
3033
- node_js: "6"

tests/e2e_runner.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ Error.stackTraceLimit = Infinity;
2828
* --nolink Skip linking your local @angular/cli directory. Can save a few seconds.
2929
* --ng-sha=SHA Use a specific ng-sha. Similar to nightly but point to a master SHA instead
3030
* of using the latest.
31+
* --glob Run tests matching this glob pattern (relative to tests/e2e/).
32+
* --ignore Ignore tests matching this glob pattern.
3133
* --nightly Install angular nightly builds over the test project.
3234
* --reuse=/path Use a path instead of create a new project. That project should have been
3335
* created, and npm installed. Ideally you want a project created by a previous
@@ -36,7 +38,7 @@ Error.stackTraceLimit = Infinity;
3638
*/
3739
const argv = minimist(process.argv.slice(2), {
3840
'boolean': ['debug', 'nolink', 'nightly', 'noproject', 'verbose'],
39-
'string': ['reuse', 'ng-sha']
41+
'string': ['glob', 'ignore', 'reuse', 'ng-sha', ]
4042
});
4143

4244

@@ -67,15 +69,15 @@ ConsoleLoggerStack.start(new IndentLogger('name'))
6769
output.write(color(entry.message) + '\n');
6870
});
6971

70-
72+
const testGlob = argv.glob || 'tests/**/*.ts';
7173
let currentFileName = null;
7274
let index = 0;
7375

7476
const e2eRoot = path.join(__dirname, 'e2e');
7577
const allSetups = glob.sync(path.join(e2eRoot, 'setup/**/*.ts'), { nodir: true })
7678
.map(name => path.relative(e2eRoot, name))
7779
.sort();
78-
const allTests = glob.sync(path.join(e2eRoot, 'tests/**/*.ts'), { nodir: true })
80+
const allTests = glob.sync(path.join(e2eRoot, testGlob), { nodir: true, ignore: argv.ignore })
7981
.map(name => path.relative(e2eRoot, name))
8082
.sort();
8183

0 commit comments

Comments
 (0)