diff --git a/.cirrus.yml b/.cirrus.yml index 8f3e5888be3..ad595e8a9cf 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -88,10 +88,33 @@ task: container: cpu: 4 memory: 12G + # all of the tests except the ones in test/integration and test/commands/create_test for packages/flutter_tools - name: tool_tests-linux env: GCLOUD_SERVICE_ACCOUNT_KEY: ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb] SHARD: tool_tests + SUBSHARD: tool + test_script: + - dart --enable-asserts ./dev/bots/test.dart + container: + cpu: 4 + memory: 12G + - name: tool_tests_create-linux + env: + GCLOUD_SERVICE_ACCOUNT_KEY: ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb] + SHARD: tool_tests + SUBSHARD: create + test_script: + - dart --enable-asserts ./dev/bots/test.dart + container: + cpu: 4 + memory: 12G + # all of the tests in test/integration for packages/flutter_tools + - name: tool_tests_integration-linux + env: + GCLOUD_SERVICE_ACCOUNT_KEY: ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb] + SHARD: tool_tests + SUBSHARD: integration test_script: - dart --enable-asserts ./dev/bots/test.dart container: @@ -185,6 +208,57 @@ task: - export CIRRUS_CHANGE_MESSAGE=`cat /tmp/cirrus_change_message.txt` - export CIRRUS_COMMIT_MESSAGE=`cat /tmp/cirrus_commit_message.txt` + +task: + use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == '' + windows_container: + image: cirrusci/android-sdk:28-windowsservercore-2019 + os_version: 2019 + cpu: 4 + env: + CIRRUS_WORKING_DIR: "C:\\Windows\\Temp\\flutter sdk" + git_fetch_script: + - git clean -xfd + - git fetch origin + - git fetch origin master # To set FETCH_HEAD for "git merge-base" to work + pub_cache: + folder: $APPDATA\Pub\Cache + fingerprint_script: + - ps: $Env:OS; Get-ChildItem -Path "$Env:CIRRUS_WORKING_DIR" pubspec.yaml -Recurse | Select-String -Pattern "PUBSPEC CHECKSUM" -SimpleMatch + flutter_pkg_cache: + folder: bin\cache\pkg + fingerprint_script: echo %OS% & type bin\internal\engine.version + artifacts_cache: + folder: bin\cache\artifacts + fingerprint_script: echo %OS% & type bin\internal\engine.version + setup_script: + - bin\flutter.bat config --no-analytics + - bin\flutter.bat doctor -v + - bin\flutter.bat update-packages + - git fetch origin master + test_all_script: + - bin\cache\dart-sdk\bin\dart.exe --enable-asserts dev\bots\test.dart + matrix: + # all of the tests except test/integration and test/commands/create_test for packages/flutter_tools + - name: tool_tests-windows + env: + GCLOUD_SERVICE_ACCOUNT_KEY: ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb] + SHARD: tool_tests + SUBSHARD: tool + SHARD_INDEX: 1 + # all of the tests in test/commands/create_test + - name: tool_tests_create-windows + env: + GCLOUD_SERVICE_ACCOUNT_KEY: ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb] + SHARD: tool_tests + SUBSHARD: create + # all of the tests in test/integration for packages/flutter_tools + - name: tool_tests_integration-windows + env: + GCLOUD_SERVICE_ACCOUNT_KEY: ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb] + SHARD: tool_tests + SUBSHARD: integration + task: use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == '' windows_container: @@ -230,10 +304,6 @@ task: GCLOUD_SERVICE_ACCOUNT_KEY: ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb] SHARD: tests SUBSHARD: extras - - name: tool_tests-windows - env: - GCLOUD_SERVICE_ACCOUNT_KEY: ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb] - SHARD: tool_tests - name: build_tests-windows env: SHARD: build_tests @@ -285,6 +355,58 @@ task: test_all_script: - ./dev/bots/deploy_gallery.sh +task: + use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' + osx_instance: + image: mojave-xcode-10.1 + depends_on: + - analyze + env: + CIRRUS_WORKING_DIR: "/tmp/flutter sdk" + COCOAPODS_DISABLE_STATS: true + print_date_script: + - date + git_fetch_script: + - git clean -xfd + - git fetch origin + - git fetch origin master # To set FETCH_HEAD for "git merge-base" to work + pub_cache: + folder: $HOME/.pub-cache + fingerprint_script: echo $OS; grep -r --include=pubspec.yaml 'PUBSPEC CHECKSUM' "$CIRRUS_WORKING_DIR" + flutter_pkg_cache: + folder: bin/cache/pkg + fingerprint_script: echo $OS; cat bin/internal/engine.version + artifacts_cache: + folder: bin/cache/artifacts + fingerprint_script: echo $OS; cat bin/internal/engine.version + setup_script: + - bin/flutter config --no-analytics + - bin/flutter doctor -v + - bin/flutter update-packages + test_all_script: | + ulimit -S -n 2048 # https://github.com/flutter/flutter/issues/2976 + bin/cache/dart-sdk/bin/dart --enable-asserts dev/bots/test.dart + matrix: + # all of the tests except test/integration and test/commands/create_test for packages/flutter_tools + - name: tool_tests-macos + env: + GCLOUD_SERVICE_ACCOUNT_KEY: ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb] + SHARD: tool_tests + SUBSHARD: tool + SHARD_INDEX: 1 + # all of the tests in test/commands/create_test + - name: tool_tests_create-macos + env: + GCLOUD_SERVICE_ACCOUNT_KEY: ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb] + SHARD: tool_tests + SUBSHARD: create + # all of the tests in test/integration for packages/flutter_tools + - name: tool_tests_integration-macos + env: + GCLOUD_SERVICE_ACCOUNT_KEY: ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb] + SHARD: tool_tests + SUBSHARD: integration + task: use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' osx_instance: @@ -310,10 +432,6 @@ task: GCLOUD_SERVICE_ACCOUNT_KEY: ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb] SHARD: tests SUBSHARD: extras - - name: tool_tests-macos - env: - GCLOUD_SERVICE_ACCOUNT_KEY: ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb] - SHARD: tool_tests - name: $SHARD-macos env: matrix: @@ -368,6 +486,8 @@ docker_builder: - tests_framework_other-linux - tests_extras-linux - tool_tests-linux + - tool_tests_create-linux + - tool_tests_integration-linux - build_tests-linux - integration_tests-linux - integration_tests_gradle-linux diff --git a/dev/bots/test.dart b/dev/bots/test.dart index 4c8fde19cc5..e62b8946767 100644 --- a/dev/bots/test.dart +++ b/dev/bots/test.dart @@ -469,6 +469,19 @@ Future _buildRunnerTest( pubEnvironment['FLUTTER_TOOL_ARGS'] = toolsArgs.trim(); } + final String subShard = Platform.environment['SUBSHARD']; + switch (subShard) { + case 'integration': + args.addAll(['--tags', 'integration']); + break; + case 'create': + args.addAll(['--tags', 'create']); + break; + case 'tool': + args.addAll(['-x', 'integration', '-x', 'create']); + break; + } + if (useFlutterTestFormatter) { final FlutterCompactFormatter formatter = FlutterCompactFormatter(); final Stream testOutput = runAndGetStdout( @@ -512,6 +525,17 @@ Future _pubRunTest( toolsArgs += ' --enable-asserts'; pubEnvironment['FLUTTER_TOOL_ARGS'] = toolsArgs.trim(); } + + final String subShard = Platform.environment['SUBSHARD']; + switch (subShard) { + case 'integration': + args.addAll(['--tags', 'integration']); + break; + case 'tool': + args.addAll(['--exclude-tags', 'integration']); + break; + } + if (useFlutterTestFormatter) { final FlutterCompactFormatter formatter = FlutterCompactFormatter(); final Stream testOutput = runAndGetStdout( diff --git a/packages/flutter_tools/test/commands/create_test.dart b/packages/flutter_tools/test/commands/create_test.dart index a1e13769b21..5008d104860 100644 --- a/packages/flutter_tools/test/commands/create_test.dart +++ b/packages/flutter_tools/test/commands/create_test.dart @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +@Tags(['create']) import 'dart:async'; import 'dart:convert'; import 'dart:typed_data'; diff --git a/packages/flutter_tools/test/integration/daemon_mode_test.dart b/packages/flutter_tools/test/integration/daemon_mode_test.dart index c63fc3360f5..c5950cc8f3e 100644 --- a/packages/flutter_tools/test/integration/daemon_mode_test.dart +++ b/packages/flutter_tools/test/integration/daemon_mode_test.dart @@ -90,5 +90,5 @@ void main() { expect(result, isList); expect(result, isNotEmpty); }); - }, timeout: const Timeout.factor(10)); // This test uses the `flutter` tool, which could be blocked behind the startup lock for a long time. + }, timeout: const Timeout.factor(10), tags: ['integration']); // This test uses the `flutter` tool, which could be blocked behind the startup lock for a long time. } diff --git a/packages/flutter_tools/test/integration/debugger_stepping_test.dart b/packages/flutter_tools/test/integration/debugger_stepping_test.dart index 4173d1077a9..00d70de3754 100644 --- a/packages/flutter_tools/test/integration/debugger_stepping_test.dart +++ b/packages/flutter_tools/test/integration/debugger_stepping_test.dart @@ -49,5 +49,5 @@ void main() { reason: 'After $i steps, debugger should stop at $expectedLine but stopped at $actualLine'); } }); - }, timeout: const Timeout.factor(10)); // The DevFS sync takes a really long time, so these tests can be slow. + }, timeout: const Timeout.factor(10), tags: ['integration']); // The DevFS sync takes a really long time, so these tests can be slow. } diff --git a/packages/flutter_tools/test/integration/expression_evaluation_test.dart b/packages/flutter_tools/test/integration/expression_evaluation_test.dart index 7ab5356d62b..bd131bdfe4d 100644 --- a/packages/flutter_tools/test/integration/expression_evaluation_test.dart +++ b/packages/flutter_tools/test/integration/expression_evaluation_test.dart @@ -81,7 +81,7 @@ void main() { await breakInBuildMethod(_flutter); await evaluateComplexReturningExpressions(_flutter); }); - }, timeout: const Timeout.factor(10)); // The DevFS sync takes a really long time, so these tests can be slow. + }, timeout: const Timeout.factor(10), tags: ['integration']); // The DevFS sync takes a really long time, so these tests can be slow. group('flutter test expression evaluation', () { Directory tempDir; @@ -126,7 +126,7 @@ void main() { await evaluateComplexReturningExpressions(_flutter); }); // Skipped due to https://github.com/flutter/flutter/issues/26518 - }, timeout: const Timeout.factor(10), skip: true); // The DevFS sync takes a really long time, so these tests can be slow. + }, timeout: const Timeout.factor(10), skip: true, tags: ['integration']); // The DevFS sync takes a really long time, so these tests can be slow. } Future evaluateTrivialExpressions(FlutterTestDriver flutter) async { diff --git a/packages/flutter_tools/test/integration/flutter_attach_test.dart b/packages/flutter_tools/test/integration/flutter_attach_test.dart index 1b5ac6a5b93..572f9e4a445 100644 --- a/packages/flutter_tools/test/integration/flutter_attach_test.dart +++ b/packages/flutter_tools/test/integration/flutter_attach_test.dart @@ -58,5 +58,5 @@ void main() { await _flutterAttach.attach(_flutterRun.vmServicePort); await _flutterAttach.hotReload(); }); - }, timeout: const Timeout.factor(10)); // The DevFS sync takes a really long time, so these tests can be slow. + }, timeout: const Timeout.factor(10), tags: ['integration']); // The DevFS sync takes a really long time, so these tests can be slow. } diff --git a/packages/flutter_tools/test/integration/flutter_run_test.dart b/packages/flutter_tools/test/integration/flutter_run_test.dart index 55d9db3b790..784faca92be 100644 --- a/packages/flutter_tools/test/integration/flutter_run_test.dart +++ b/packages/flutter_tools/test/integration/flutter_run_test.dart @@ -55,5 +55,5 @@ void main() { await _flutter.run(pidFile: pidFile); expect(pidFile.existsSync(), isTrue); }); - }, timeout: const Timeout.factor(10)); // The DevFS sync takes a really long time, so these tests can be slow. + }, timeout: const Timeout.factor(10), tags: ['integration']); // The DevFS sync takes a really long time, so these tests can be slow. } diff --git a/packages/flutter_tools/test/integration/hot_reload_test.dart b/packages/flutter_tools/test/integration/hot_reload_test.dart index fae2ae66608..47c4e99f661 100644 --- a/packages/flutter_tools/test/integration/hot_reload_test.dart +++ b/packages/flutter_tools/test/integration/hot_reload_test.dart @@ -149,5 +149,5 @@ void main() { await _flutter.resume(); await subscription.cancel(); }); - }, timeout: const Timeout.factor(10)); // The DevFS sync takes a really long time, so these tests can be slow. + }, timeout: const Timeout.factor(10), tags: ['integration']); // The DevFS sync takes a really long time, so these tests can be slow. } diff --git a/packages/flutter_tools/test/integration/lifetime_test.dart b/packages/flutter_tools/test/integration/lifetime_test.dart index c3c1b27d4a8..8bad8cb5bd9 100644 --- a/packages/flutter_tools/test/integration/lifetime_test.dart +++ b/packages/flutter_tools/test/integration/lifetime_test.dart @@ -45,5 +45,5 @@ void main() { await Future.delayed(requiredLifespan); expect(_flutter.hasExited, equals(false)); }); - }, timeout: const Timeout.factor(10)); // The DevFS sync takes a really long time, so these tests can be slow. + }, timeout: const Timeout.factor(10), tags: ['integration']); // The DevFS sync takes a really long time, so these tests can be slow. }