Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

Commit f6e9c0f

Browse files
committed
ci: disable tests on platforms that dont support the test
1 parent 7fbe494 commit f6e9c0f

File tree

4 files changed

+39
-11
lines changed

4 files changed

+39
-11
lines changed

packages/angular_devkit/build_angular/test/browser/rebuild_spec_large.ts

+9-2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ import { TestLogger, Timeout, browserTargetSpec, host, runTargetSpec } from '../
1212
import { lazyModuleFiles, lazyModuleImport } from './lazy-module_spec_large';
1313

1414

15+
// TODO: replace this with an "it()" macro that's reusable globally.
16+
let linuxOnlyIt: typeof it = it;
17+
if (process.platform.startsWith('win')) {
18+
linuxOnlyIt = xit;
19+
}
20+
21+
1522
describe('Browser Builder rebuilds', () => {
1623
const outputPath = normalize('dist');
1724

@@ -201,7 +208,7 @@ describe('Browser Builder rebuilds', () => {
201208
}, Timeout.Basic);
202209

203210

204-
it('rebuilds after errors in AOT', (done) => {
211+
linuxOnlyIt('rebuilds after errors in AOT', (done) => {
205212
// Save the original contents of `./src/app/app.component.ts`.
206213
const origContent = virtualFs.fileBufferToString(
207214
host.scopedSync().read(normalize('src/app/app.component.ts')));
@@ -263,7 +270,7 @@ describe('Browser Builder rebuilds', () => {
263270
}, Timeout.Complex);
264271

265272

266-
it('rebuilds AOT factories', (done) => {
273+
linuxOnlyIt('rebuilds AOT factories', (done) => {
267274

268275
host.writeMultipleFiles({
269276
'src/app/app.component.css': `

packages/angular_devkit/build_angular/test/protractor/works_spec_large.ts

+11-4
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,32 @@ import { retry } from 'rxjs/operators';
1111
import { host, protractorTargetSpec, runTargetSpec } from '../utils';
1212

1313

14+
// TODO: replace this with an "it()" macro that's reusable globally.
15+
let linuxOnlyIt: typeof it = it;
16+
if (process.platform.startsWith('win')) {
17+
linuxOnlyIt = xit;
18+
}
19+
20+
1421
describe('Protractor Builder', () => {
1522
beforeEach(done => host.initialize().subscribe(undefined, done.fail, done));
1623
afterEach(done => host.restore().subscribe(undefined, done.fail, done));
1724

18-
it('works', (done) => {
25+
linuxOnlyIt('works', (done) => {
1926
runTargetSpec(host, protractorTargetSpec).pipe(
2027
retry(3),
2128
).subscribe(undefined, done.fail, done);
2229
}, 30000);
2330

24-
it('works with no devServerTarget', (done) => {
31+
linuxOnlyIt('works with no devServerTarget', (done) => {
2532
const overrides = { devServerTarget: undefined };
2633

2734
runTargetSpec(host, protractorTargetSpec, overrides).pipe(
2835
// This should fail because no server is available for connection.
2936
).subscribe(undefined, done, done.fail);
3037
}, 30000);
3138

32-
it('overrides protractor specs', (done) => {
39+
linuxOnlyIt('overrides protractor specs', (done) => {
3340
host.scopedSync().rename(normalize('./e2e/app.e2e-spec.ts'),
3441
normalize('./e2e/renamed-app.e2e-spec.ts'));
3542

@@ -40,7 +47,7 @@ describe('Protractor Builder', () => {
4047
).subscribe(undefined, done.fail, done);
4148
}, 60000);
4249

43-
it('overrides protractor suites', (done) => {
50+
linuxOnlyIt('overrides protractor suites', (done) => {
4451
host.scopedSync().rename(normalize('./e2e/app.e2e-spec.ts'),
4552
normalize('./e2e/renamed-app.e2e-spec.ts'));
4653

packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ import { NodeJsSyncHost } from '@angular-devkit/core/node';
1212
import { concatMap, tap } from 'rxjs/operators';
1313

1414

15+
// TODO: replace this with an "it()" macro that's reusable globally.
16+
let linuxOnlyIt: typeof it = it;
17+
if (process.platform.startsWith('win')) {
18+
linuxOnlyIt = xit;
19+
}
20+
21+
1522
describe('NgPackagr Builder', () => {
1623
const workspaceFile = normalize('angular.json');
1724
const devkitRoot = normalize((global as any)._DevKitRoot); // tslint:disable-line:no-any
@@ -33,7 +40,7 @@ describe('NgPackagr Builder', () => {
3340
).subscribe(undefined, done.fail, done);
3441
}, 30000);
3542

36-
it('tests works', (done) => {
43+
linuxOnlyIt('tests works', (done) => {
3744
const targetSpec: TargetSpecifier = { project: 'lib', target: 'test' };
3845

3946
return workspace.loadWorkspaceFromHost(workspaceFile).pipe(

packages/angular_devkit/core/node/host_spec.ts

+11-4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ import { Observable, Subscription } from 'rxjs';
1616
const temp = require('temp');
1717

1818

19+
// TODO: replace this with an "it()" macro that's reusable globally.
20+
let linuxOnlyIt: typeof it = it;
21+
if (process.platform.startsWith('win') || process.platform.startsWith('darwin')) {
22+
linuxOnlyIt = xit;
23+
}
24+
25+
1926
describe('NodeJsAsyncHost', () => {
2027
let root: string;
2128
let host: virtualFs.Host<fs.Stats>;
@@ -29,7 +36,7 @@ describe('NodeJsAsyncHost', () => {
2936
.subscribe({ complete() { done(); } });
3037
});
3138

32-
it('can watch', done => {
39+
linuxOnlyIt('can watch', done => {
3340
let obs: Observable<virtualFs.HostWatchEvent>;
3441
let subscription: Subscription;
3542
const content = virtualFs.stringToFileBuffer('hello world');
@@ -56,7 +63,7 @@ describe('NodeJsAsyncHost', () => {
5663
subscription.unsubscribe();
5764
})
5865
.then(done, done.fail);
59-
}, 10000000);
66+
}, 30000);
6067
});
6168

6269

@@ -73,7 +80,7 @@ describe('NodeJsSyncHost', () => {
7380
host.delete(normalize('/'));
7481
});
7582

76-
it('can watch', done => {
83+
linuxOnlyIt('can watch', done => {
7784
let obs: Observable<virtualFs.HostWatchEvent>;
7885
let subscription: Subscription;
7986
const content = virtualFs.stringToFileBuffer('hello world');
@@ -102,6 +109,6 @@ describe('NodeJsSyncHost', () => {
102109
subscription.unsubscribe();
103110
})
104111
.then(done, done.fail);
105-
}, 10000000);
112+
}, 30000);
106113

107114
});

0 commit comments

Comments
 (0)