Skip to content

Commit bae92c3

Browse files
authored
Disable tests that fail on non-master branches from running on those branches (flutter#45455)
flutter#45453
1 parent 980f14e commit bae92c3

File tree

2 files changed

+26
-14
lines changed

2 files changed

+26
-14
lines changed

.cirrus.yml

+12-8
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ task:
229229
- dart --enable-asserts ./dev/bots/test.dart
230230

231231
- name: hostonly_devicelab_tests-0-linux
232+
only_if: "$CIRRUS_PR != '' || $CIRRUS_BRANCH == 'master'" # https://github.com/flutter/flutter/issues/45453
232233
environment:
233234
# Some of the host-only devicelab tests are pretty involved and need a lot of RAM.
234235
CPU: 2
@@ -237,6 +238,7 @@ task:
237238
- dart --enable-asserts ./dev/bots/test.dart
238239

239240
- name: hostonly_devicelab_tests-1-linux
241+
only_if: "$CIRRUS_PR != '' || $CIRRUS_BRANCH == 'master'" # https://github.com/flutter/flutter/issues/45453
240242
environment:
241243
# Some of the host-only devicelab tests are pretty involved and need a lot of RAM.
242244
CPU: 2
@@ -245,6 +247,7 @@ task:
245247
- dart --enable-asserts ./dev/bots/test.dart
246248

247249
- name: hostonly_devicelab_tests-2-linux
250+
only_if: "$CIRRUS_PR != '' || $CIRRUS_BRANCH == 'master'" # https://github.com/flutter/flutter/issues/45453
248251
environment:
249252
# Some of the host-only devicelab tests are pretty involved and need a lot of RAM.
250253
CPU: 2
@@ -253,6 +256,7 @@ task:
253256
- dart --enable-asserts ./dev/bots/test.dart
254257

255258
- name: hostonly_devicelab_tests-3_last-linux
259+
only_if: "$CIRRUS_PR != '' || $CIRRUS_BRANCH == 'master'" # https://github.com/flutter/flutter/issues/45453
256260
environment:
257261
# Some of the host-only devicelab tests are pretty involved and need a lot of RAM.
258262
CPU: 2
@@ -399,22 +403,22 @@ task:
399403
- dart --enable-asserts dev\bots\test.dart
400404

401405
- name: hostonly_devicelab_tests-0-windows
402-
only_if: "changesInclude('.cirrus.yml', 'dev/**', 'bin/internal/**') || $CIRRUS_PR == ''" # https://github.com/flutter/flutter/issues/41941
406+
only_if: "changesInclude('.cirrus.yml', 'dev/**', 'bin/internal/**') || ($CIRRUS_PR == '' && $CIRRUS_BRANCH == 'master')" # https://github.com/flutter/flutter/issues/41941 https://github.com/flutter/flutter/issues/45453
403407
script:
404408
- dart --enable-asserts ./dev/bots/test.dart
405409

406410
- name: hostonly_devicelab_tests-1-windows
407-
only_if: "changesInclude('.cirrus.yml', 'dev/**', 'bin/internal/**') || $CIRRUS_PR == ''" # https://github.com/flutter/flutter/issues/41941
411+
only_if: "changesInclude('.cirrus.yml', 'dev/**', 'bin/internal/**') || ($CIRRUS_PR == '' && $CIRRUS_BRANCH == 'master')" # https://github.com/flutter/flutter/issues/41941 https://github.com/flutter/flutter/issues/45453
408412
script:
409413
- dart --enable-asserts ./dev/bots/test.dart
410414

411415
- name: hostonly_devicelab_tests-2-windows
412-
only_if: "changesInclude('.cirrus.yml', 'dev/**', 'bin/internal/**') || $CIRRUS_PR == ''" # https://github.com/flutter/flutter/issues/41941
416+
only_if: "changesInclude('.cirrus.yml', 'dev/**', 'bin/internal/**') || ($CIRRUS_PR == '' && $CIRRUS_BRANCH == 'master')" # https://github.com/flutter/flutter/issues/41941 https://github.com/flutter/flutter/issues/45453
413417
script:
414418
- dart --enable-asserts ./dev/bots/test.dart
415419

416420
- name: hostonly_devicelab_tests-3_last-windows
417-
only_if: "changesInclude('.cirrus.yml', 'dev/**', 'bin/internal/**') || $CIRRUS_PR == ''" # https://github.com/flutter/flutter/issues/41941
421+
only_if: "changesInclude('.cirrus.yml', 'dev/**', 'bin/internal/**') || ($CIRRUS_PR == '' && $CIRRUS_BRANCH == 'master')" # https://github.com/flutter/flutter/issues/41941 https://github.com/flutter/flutter/issues/45453
418422
script:
419423
- dart --enable-asserts ./dev/bots/test.dart
420424

@@ -512,25 +516,25 @@ task:
512516
- dart --enable-asserts ./dev/bots/test.dart
513517

514518
- name: hostonly_devicelab_tests-0-macos
515-
only_if: "changesInclude('.cirrus.yml', 'dev/**', 'bin/internal/**') || $CIRRUS_PR == ''" # https://github.com/flutter/flutter/issues/41940
519+
only_if: "changesInclude('.cirrus.yml', 'dev/**', 'bin/internal/**') || ($CIRRUS_PR == '' && $CIRRUS_BRANCH == 'master')" # https://github.com/flutter/flutter/issues/41941 https://github.com/flutter/flutter/issues/45453
516520
script:
517521
- ulimit -S -n 2048 # https://github.com/flutter/flutter/issues/2976
518522
- dart --enable-asserts ./dev/bots/test.dart
519523

520524
- name: hostonly_devicelab_tests-1-macos
521-
only_if: "changesInclude('.cirrus.yml', 'dev/**', 'bin/internal/**') || $CIRRUS_PR == ''" # https://github.com/flutter/flutter/issues/41940
525+
only_if: "changesInclude('.cirrus.yml', 'dev/**', 'bin/internal/**') || ($CIRRUS_PR == '' && $CIRRUS_BRANCH == 'master')" # https://github.com/flutter/flutter/issues/41941 https://github.com/flutter/flutter/issues/45453
522526
script:
523527
- ulimit -S -n 2048 # https://github.com/flutter/flutter/issues/2976
524528
- dart --enable-asserts ./dev/bots/test.dart
525529

526530
- name: hostonly_devicelab_tests-2-macos
527-
only_if: "changesInclude('.cirrus.yml', 'dev/**', 'bin/internal/**') || $CIRRUS_PR == ''" # https://github.com/flutter/flutter/issues/41940
531+
only_if: "changesInclude('.cirrus.yml', 'dev/**', 'bin/internal/**') || ($CIRRUS_PR == '' && $CIRRUS_BRANCH == 'master')" # https://github.com/flutter/flutter/issues/41941 https://github.com/flutter/flutter/issues/45453
528532
script:
529533
- ulimit -S -n 2048 # https://github.com/flutter/flutter/issues/2976
530534
- dart --enable-asserts ./dev/bots/test.dart
531535

532536
- name: hostonly_devicelab_tests-3_last-macos
533-
only_if: "changesInclude('.cirrus.yml', 'dev/**', 'bin/internal/**') || $CIRRUS_PR == ''" # https://github.com/flutter/flutter/issues/41940
537+
only_if: "changesInclude('.cirrus.yml', 'dev/**', 'bin/internal/**') || ($CIRRUS_PR == '' && $CIRRUS_BRANCH == 'master')" # https://github.com/flutter/flutter/issues/41941 https://github.com/flutter/flutter/issues/45453
534538
script:
535539
- ulimit -S -n 2048 # https://github.com/flutter/flutter/issues/2976
536540
- dart --enable-asserts ./dev/bots/test.dart

dev/bots/test.dart

+14-6
Original file line numberDiff line numberDiff line change
@@ -291,12 +291,20 @@ Future<void> _runBuildTests() async {
291291
await _flutterBuildIpa(examplePath);
292292
}
293293
}
294-
// Web compilation tests.
295-
await _flutterBuildDart2js(path.join('dev', 'integration_tests', 'web'), path.join('lib', 'main.dart'));
296-
// Should not fail to compile with dart:io.
297-
await _flutterBuildDart2js(path.join('dev', 'integration_tests', 'web_compile_tests'),
298-
path.join('lib', 'dart_io_import.dart'),
299-
);
294+
295+
final String branch = Platform.environment['CIRRUS_BRANCH'];
296+
if (branch != 'beta' && branch != 'stable') {
297+
// Web compilation tests.
298+
await _flutterBuildDart2js(
299+
path.join('dev', 'integration_tests', 'web'),
300+
path.join('lib', 'main.dart'),
301+
);
302+
// Should not fail to compile with dart:io.
303+
await _flutterBuildDart2js(
304+
path.join('dev', 'integration_tests', 'web_compile_tests'),
305+
path.join('lib', 'dart_io_import.dart'),
306+
);
307+
}
300308
}
301309

302310
Future<void> _flutterBuildAot(String relativePathToApplication) async {

0 commit comments

Comments
 (0)