From 1e8bed2d1df35fa76a7cf1819c8aa2c05c31cbac Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 8 Feb 2017 15:37:06 +0000 Subject: [PATCH] ci(e2e): split required e2e suite --- .travis.yml | 5 ++++- tests/e2e_runner.ts | 8 +++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 67b8c31edcd3..8fe3aabacdce 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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" diff --git a/tests/e2e_runner.ts b/tests/e2e_runner.ts index bde7ac6d4a23..2881c540ecc5 100644 --- a/tests/e2e_runner.ts +++ b/tests/e2e_runner.ts @@ -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 @@ -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', ] }); @@ -67,7 +69,7 @@ ConsoleLoggerStack.start(new IndentLogger('name')) output.write(color(entry.message) + '\n'); }); - +const testGlob = argv.glob || 'tests/**/*.ts'; let currentFileName = null; let index = 0; @@ -75,7 +77,7 @@ 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();