Skip to content

Commit 4cd2907

Browse files
alan-agius4Keen Yee Liau
authored andcommitted
test: run ivy-ngcc binary to reduce flakes
1 parent fb0a6af commit 4cd2907

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

scripts/test.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// tslint:disable:no-console
99
// tslint:disable:no-implicit-dependencies
1010
import { logging } from '@angular-devkit/core';
11-
import { spawnSync } from 'child_process';
11+
import { execSync, spawnSync } from 'child_process';
1212
import * as glob from 'glob';
1313
import 'jasmine';
1414
import { SpecReporter as JasmineSpecReporter } from 'jasmine-spec-reporter';
@@ -23,8 +23,6 @@ const knownFlakes = [
2323
// Rebuild tests in test-large are flakey if not run as the first suite.
2424
// https://github.com/angular/angular-cli/pull/15204
2525
'packages/angular_devkit/build_angular/test/browser/rebuild_spec_large.ts',
26-
// This is flaky with NGCC
27-
'packages/angular_devkit/build_angular/test/karma/selected_spec_large.ts',
2826
];
2927

3028
const projectBaseDir = join(__dirname, '..');
@@ -94,6 +92,10 @@ export default function(args: ParsedArgs, logger: logging.Logger) {
9492
if (args['ve']) {
9593
// tslint:disable-next-line:no-console
9694
console.warn('********* VE Enabled ***********');
95+
} else if (args.shard !== undefined) {
96+
// CI is really flaky with NGCC
97+
// This is a working around test order and isolation issues.
98+
execSync('./node_modules/.bin/ivy-ngcc', { stdio: 'inherit' });
9799
}
98100

99101
if (args.large) {

0 commit comments

Comments
 (0)