From bae92c32e5233e9113e42962179773309fb3ad8c Mon Sep 17 00:00:00 2001 From: Todd Volkert Date: Sun, 24 Nov 2019 22:29:28 -0800 Subject: [PATCH] Disable tests that fail on non-master branches from running on those branches (#45455) https://github.com/flutter/flutter/issues/45453 --- .cirrus.yml | 20 ++++++++++++-------- dev/bots/test.dart | 20 ++++++++++++++------ 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index f11e18d2558..1ae3c4f282b 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -229,6 +229,7 @@ task: - dart --enable-asserts ./dev/bots/test.dart - name: hostonly_devicelab_tests-0-linux + only_if: "$CIRRUS_PR != '' || $CIRRUS_BRANCH == 'master'" # https://github.com/flutter/flutter/issues/45453 environment: # Some of the host-only devicelab tests are pretty involved and need a lot of RAM. CPU: 2 @@ -237,6 +238,7 @@ task: - dart --enable-asserts ./dev/bots/test.dart - name: hostonly_devicelab_tests-1-linux + only_if: "$CIRRUS_PR != '' || $CIRRUS_BRANCH == 'master'" # https://github.com/flutter/flutter/issues/45453 environment: # Some of the host-only devicelab tests are pretty involved and need a lot of RAM. CPU: 2 @@ -245,6 +247,7 @@ task: - dart --enable-asserts ./dev/bots/test.dart - name: hostonly_devicelab_tests-2-linux + only_if: "$CIRRUS_PR != '' || $CIRRUS_BRANCH == 'master'" # https://github.com/flutter/flutter/issues/45453 environment: # Some of the host-only devicelab tests are pretty involved and need a lot of RAM. CPU: 2 @@ -253,6 +256,7 @@ task: - dart --enable-asserts ./dev/bots/test.dart - name: hostonly_devicelab_tests-3_last-linux + only_if: "$CIRRUS_PR != '' || $CIRRUS_BRANCH == 'master'" # https://github.com/flutter/flutter/issues/45453 environment: # Some of the host-only devicelab tests are pretty involved and need a lot of RAM. CPU: 2 @@ -399,22 +403,22 @@ task: - dart --enable-asserts dev\bots\test.dart - name: hostonly_devicelab_tests-0-windows - only_if: "changesInclude('.cirrus.yml', 'dev/**', 'bin/internal/**') || $CIRRUS_PR == ''" # https://github.com/flutter/flutter/issues/41941 + 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 script: - dart --enable-asserts ./dev/bots/test.dart - name: hostonly_devicelab_tests-1-windows - only_if: "changesInclude('.cirrus.yml', 'dev/**', 'bin/internal/**') || $CIRRUS_PR == ''" # https://github.com/flutter/flutter/issues/41941 + 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 script: - dart --enable-asserts ./dev/bots/test.dart - name: hostonly_devicelab_tests-2-windows - only_if: "changesInclude('.cirrus.yml', 'dev/**', 'bin/internal/**') || $CIRRUS_PR == ''" # https://github.com/flutter/flutter/issues/41941 + 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 script: - dart --enable-asserts ./dev/bots/test.dart - name: hostonly_devicelab_tests-3_last-windows - only_if: "changesInclude('.cirrus.yml', 'dev/**', 'bin/internal/**') || $CIRRUS_PR == ''" # https://github.com/flutter/flutter/issues/41941 + 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 script: - dart --enable-asserts ./dev/bots/test.dart @@ -512,25 +516,25 @@ task: - dart --enable-asserts ./dev/bots/test.dart - name: hostonly_devicelab_tests-0-macos - only_if: "changesInclude('.cirrus.yml', 'dev/**', 'bin/internal/**') || $CIRRUS_PR == ''" # https://github.com/flutter/flutter/issues/41940 + 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 script: - ulimit -S -n 2048 # https://github.com/flutter/flutter/issues/2976 - dart --enable-asserts ./dev/bots/test.dart - name: hostonly_devicelab_tests-1-macos - only_if: "changesInclude('.cirrus.yml', 'dev/**', 'bin/internal/**') || $CIRRUS_PR == ''" # https://github.com/flutter/flutter/issues/41940 + 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 script: - ulimit -S -n 2048 # https://github.com/flutter/flutter/issues/2976 - dart --enable-asserts ./dev/bots/test.dart - name: hostonly_devicelab_tests-2-macos - only_if: "changesInclude('.cirrus.yml', 'dev/**', 'bin/internal/**') || $CIRRUS_PR == ''" # https://github.com/flutter/flutter/issues/41940 + 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 script: - ulimit -S -n 2048 # https://github.com/flutter/flutter/issues/2976 - dart --enable-asserts ./dev/bots/test.dart - name: hostonly_devicelab_tests-3_last-macos - only_if: "changesInclude('.cirrus.yml', 'dev/**', 'bin/internal/**') || $CIRRUS_PR == ''" # https://github.com/flutter/flutter/issues/41940 + 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 script: - ulimit -S -n 2048 # https://github.com/flutter/flutter/issues/2976 - dart --enable-asserts ./dev/bots/test.dart diff --git a/dev/bots/test.dart b/dev/bots/test.dart index e26c955c9a8..ee779205405 100644 --- a/dev/bots/test.dart +++ b/dev/bots/test.dart @@ -291,12 +291,20 @@ Future _runBuildTests() async { await _flutterBuildIpa(examplePath); } } - // Web compilation tests. - await _flutterBuildDart2js(path.join('dev', 'integration_tests', 'web'), path.join('lib', 'main.dart')); - // Should not fail to compile with dart:io. - await _flutterBuildDart2js(path.join('dev', 'integration_tests', 'web_compile_tests'), - path.join('lib', 'dart_io_import.dart'), - ); + + final String branch = Platform.environment['CIRRUS_BRANCH']; + if (branch != 'beta' && branch != 'stable') { + // Web compilation tests. + await _flutterBuildDart2js( + path.join('dev', 'integration_tests', 'web'), + path.join('lib', 'main.dart'), + ); + // Should not fail to compile with dart:io. + await _flutterBuildDart2js( + path.join('dev', 'integration_tests', 'web_compile_tests'), + path.join('lib', 'dart_io_import.dart'), + ); + } } Future _flutterBuildAot(String relativePathToApplication) async {