Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(e2e): split required e2e suite #4528

Merged
merged 1 commit into from
Feb 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ matrix:
env: SCRIPT=test
- node_js: "6"
os: linux
env: NODE_SCRIPT=tests/run_e2e.js
env: NODE_SCRIPT="tests/run_e2e.js --glob=tests/build/**"
- node_js: "6"
os: linux
env: NODE_SCRIPT="tests/run_e2e.js --ignore=**/tests/build/**"

# Optional builds.
- node_js: "6"
Expand Down
8 changes: 5 additions & 3 deletions tests/e2e_runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ Error.stackTraceLimit = Infinity;
* --nolink Skip linking your local @angular/cli directory. Can save a few seconds.
* --ng-sha=SHA Use a specific ng-sha. Similar to nightly but point to a master SHA instead
* of using the latest.
* --glob Run tests matching this glob pattern (relative to tests/e2e/).
* --ignore Ignore tests matching this glob pattern.
* --nightly Install angular nightly builds over the test project.
* --reuse=/path Use a path instead of create a new project. That project should have been
* created, and npm installed. Ideally you want a project created by a previous
Expand All @@ -36,7 +38,7 @@ Error.stackTraceLimit = Infinity;
*/
const argv = minimist(process.argv.slice(2), {
'boolean': ['debug', 'nolink', 'nightly', 'noproject', 'verbose'],
'string': ['reuse', 'ng-sha']
'string': ['glob', 'ignore', 'reuse', 'ng-sha', ]
});


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


const testGlob = argv.glob || 'tests/**/*.ts';
let currentFileName = null;
let index = 0;

const e2eRoot = path.join(__dirname, 'e2e');
const allSetups = glob.sync(path.join(e2eRoot, 'setup/**/*.ts'), { nodir: true })
.map(name => path.relative(e2eRoot, name))
.sort();
const allTests = glob.sync(path.join(e2eRoot, 'tests/**/*.ts'), { nodir: true })
const allTests = glob.sync(path.join(e2eRoot, testGlob), { nodir: true, ignore: argv.ignore })
.map(name => path.relative(e2eRoot, name))
.sort();

Expand Down