From 576f7876c4e4ca87691b916a2787b450ada47f14 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 5 Jul 2023 14:49:38 -0400 Subject: [PATCH 1/9] Remove custom tests that now duplicate standard tests --- packages/cross_file/tool/run_tests.dart | 50 ------------------- .../tool/run_tests.dart | 50 ------------------- 2 files changed, 100 deletions(-) delete mode 100644 packages/cross_file/tool/run_tests.dart delete mode 100644 packages/google_identity_services_web/tool/run_tests.dart diff --git a/packages/cross_file/tool/run_tests.dart b/packages/cross_file/tool/run_tests.dart deleted file mode 100644 index 9d569b52110..00000000000 --- a/packages/cross_file/tool/run_tests.dart +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Runs `dart test -p chrome` in the root of the cross_file package. -// -// Called from the custom-tests CI action. -// -// usage: dart run tool/run_tests.dart -// (needs a `chrome` executable in $PATH, or a tweak to dart_test.yaml) -import 'dart:async'; -import 'dart:io'; -import 'package:path/path.dart' as p; - -Future main(List args) async { - final Directory workingDir = - Directory(p.dirname(Platform.script.path)).parent; - - final int status = await _runProcess( - 'dart', - [ - 'test', - '-p', - 'chrome', - ], - workingDirectory: workingDir.path, - ); - - exit(status); -} - -Future _streamOutput(Future processFuture) async { - final Process process = await processFuture; - unawaited(stdout.addStream(process.stdout)); - unawaited(stderr.addStream(process.stderr)); - return process; -} - -Future _runProcess( - String command, - List arguments, { - String? workingDirectory, -}) async { - final Process process = await _streamOutput(Process.start( - command, - arguments, - workingDirectory: workingDirectory, - )); - return process.exitCode; -} diff --git a/packages/google_identity_services_web/tool/run_tests.dart b/packages/google_identity_services_web/tool/run_tests.dart deleted file mode 100644 index 552cd8d00e3..00000000000 --- a/packages/google_identity_services_web/tool/run_tests.dart +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Runs `dart test -p chrome` in the root of the google_identity_services_web package. -// -// Called from the custom-tests CI action. -// -// usage: dart run tool/run_tests.dart -// (needs a `chrome` executable in $PATH, or a tweak to dart_test.yaml) -import 'dart:async'; -import 'dart:io'; -import 'package:path/path.dart' as p; - -Future main(List args) async { - final Directory workingDir = - Directory(p.dirname(Platform.script.path)).parent; - - final int status = await _runProcess( - 'dart', - [ - 'test', - '-p', - 'chrome', - ], - workingDirectory: workingDir.path, - ); - - exit(status); -} - -Future _streamOutput(Future processFuture) async { - final Process process = await processFuture; - unawaited(stdout.addStream(process.stdout)); - unawaited(stderr.addStream(process.stderr)); - return process; -} - -Future _runProcess( - String command, - List arguments, { - String? workingDirectory, -}) async { - final Process process = await _streamOutput(Process.start( - command, - arguments, - workingDirectory: workingDirectory, - )); - return process.exitCode; -} From edd434c90ea759a978ca2097803c2c2df6bcb78c Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 5 Jul 2023 14:52:21 -0400 Subject: [PATCH 2/9] Clean up exclusions, which are no longer needed --- .ci/scripts/custom_package_tests.sh | 8 +------- script/configs/linux_only_custom_test.yaml | 9 --------- 2 files changed, 1 insertion(+), 16 deletions(-) delete mode 100644 script/configs/linux_only_custom_test.yaml diff --git a/.ci/scripts/custom_package_tests.sh b/.ci/scripts/custom_package_tests.sh index c6473b267dc..85155ddb8b4 100755 --- a/.ci/scripts/custom_package_tests.sh +++ b/.ci/scripts/custom_package_tests.sh @@ -4,11 +4,5 @@ # found in the LICENSE file. set -e -# Exclusions -# -# script/configs/linux_only_custom_test.yaml -# Custom tests need Chrome. (They run in linux-custom_package_tests) - dart ./script/tool/bin/flutter_plugin_tools.dart custom-test \ - --packages-for-branch --log-timing \ - --exclude=script/configs/linux_only_custom_test.yaml + --packages-for-branch --log-timing diff --git a/script/configs/linux_only_custom_test.yaml b/script/configs/linux_only_custom_test.yaml deleted file mode 100644 index 8313d41be19..00000000000 --- a/script/configs/linux_only_custom_test.yaml +++ /dev/null @@ -1,9 +0,0 @@ -# Packages that only support `custom-test` in linux, because that's -# the only place where we install Chrome. -# -# This file is used to "--exclude" these packages from the relevant -# mac/windows CI test runs. - -- cross_file -- google_identity_services_web - From 474a231dccb944c4d5f8838fa4f154c8a531e1cb Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 5 Jul 2023 15:49:34 -0400 Subject: [PATCH 3/9] Add script --- .ci/targets/linux_custom_package_tests.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .ci/targets/linux_custom_package_tests.yaml diff --git a/.ci/targets/linux_custom_package_tests.yaml b/.ci/targets/linux_custom_package_tests.yaml new file mode 100644 index 00000000000..8c691789a81 --- /dev/null +++ b/.ci/targets/linux_custom_package_tests.yaml @@ -0,0 +1,6 @@ +tasks: + - name: prepare tool + script: .ci/scripts/prepare_tool.sh + - name: custom tests + script: script/tool_runner.sh + args: ["custom-test"] From b9b0fb71d584cb8ef778b0620763988309bc8119 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 5 Jul 2023 15:51:05 -0400 Subject: [PATCH 4/9] Add new LUCI targets --- .ci.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.ci.yaml b/.ci.yaml index cf6b714d90d..21f52e869d0 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -214,6 +214,29 @@ targets: channel: stable version_file: flutter_stable.version + - name: Linux custom_package_tests master + bringup: true # New target + recipe: packages/packages + timeout: 60 + properties: + add_recipes_cq: "true" + version_file: flutter_master.version + target_file: linux_custom_package_tests.yaml + cores: "32" + channel: master + + - name: Linux custom_package_tests stable + bringup: true # New target + recipe: packages/packages + timeout: 60 + properties: + add_recipes_cq: "true" + version_file: flutter_stable.version + target_file: linux_custom_package_tests.yaml + cores: "32" + channel: stable + + ### Android tasks ### - name: Linux_android android_build_all_packages master recipe: packages/packages From 7981f4022711e749d0c54e641995400fe340e1de Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 5 Jul 2023 15:53:38 -0400 Subject: [PATCH 5/9] DO NOT LAND - test in existing target --- .ci.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.ci.yaml b/.ci.yaml index 21f52e869d0..e6e3a8f79b8 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -93,22 +93,26 @@ targets: version_file: flutter_master.version - name: Linux dart_unit_test_shard_1 master - bringup: true # New target + # DO NOT LAND - for presubmit validation only. + #bringup: true # New target recipe: packages/packages timeout: 60 properties: - target_file: dart_unit_tests.yaml + # DO NOT LAND - for presubmit validation only. + target_file: linux_custom_package_tests.yaml channel: master version_file: flutter_master.version cores: "32" package_sharding: "--shardIndex 0 --shardCount 2" - name: Linux dart_unit_test_shard_2 master - bringup: true # New target + # DO NOT LAND - for presubmit validation only. + #bringup: true # New target recipe: packages/packages timeout: 60 properties: - target_file: dart_unit_tests.yaml + # DO NOT LAND - for presubmit validation only. + target_file: linux_custom_package_tests.yaml channel: master version_file: flutter_master.version cores: "32" From f19a52893e63efc2e493a60988378c10f66525c3 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 5 Jul 2023 18:32:47 -0400 Subject: [PATCH 6/9] Add deps to the experiment --- .ci.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.ci.yaml b/.ci.yaml index e6e3a8f79b8..e18fdad05c2 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -117,6 +117,16 @@ targets: version_file: flutter_master.version cores: "32" package_sharding: "--shardIndex 1 --shardCount 2" + # DO NOT LAND - for adding to the real target. + # Android deps for tests that build Android. + # clang for tests that run the formatter. + dependencies: >- + [ + {"dependency": "android_sdk", "version": "version:33v6"}, + {"dependency": "open_jdk", "version": "version:11"}, + {"dependency": "curl", "version": "version:7.64.0"} + {"dependency": "clang", "version": "git_revision:5d5aba78dbbee75508f01bcaa69aedb2ab79065a"}, + ] - name: Linux dart_unit_test_shard_1 stable bringup: true # New target From 8e123fe9a3821651d6077dfd0aa81ef0ec8d6fd7 Mon Sep 17 00:00:00 2001 From: stuartmorgan Date: Wed, 5 Jul 2023 18:58:45 -0400 Subject: [PATCH 7/9] copypasta in added dependencies --- .ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.ci.yaml b/.ci.yaml index e18fdad05c2..b4eb81a13de 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -124,8 +124,8 @@ targets: [ {"dependency": "android_sdk", "version": "version:33v6"}, {"dependency": "open_jdk", "version": "version:11"}, - {"dependency": "curl", "version": "version:7.64.0"} - {"dependency": "clang", "version": "git_revision:5d5aba78dbbee75508f01bcaa69aedb2ab79065a"}, + {"dependency": "curl", "version": "version:7.64.0"}, + {"dependency": "clang", "version": "git_revision:5d5aba78dbbee75508f01bcaa69aedb2ab79065a"} ] - name: Linux dart_unit_test_shard_1 stable From 4f072bb8b78acb2b486f7134c9f76de92563fade Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 5 Jul 2023 19:37:15 -0400 Subject: [PATCH 8/9] Revert presubmit test changes, update new packages --- .ci.yaml | 43 ++++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/.ci.yaml b/.ci.yaml index b4eb81a13de..c137260c804 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -93,40 +93,26 @@ targets: version_file: flutter_master.version - name: Linux dart_unit_test_shard_1 master - # DO NOT LAND - for presubmit validation only. - #bringup: true # New target + bringup: true # New target recipe: packages/packages timeout: 60 properties: - # DO NOT LAND - for presubmit validation only. - target_file: linux_custom_package_tests.yaml + target_file: dart_unit_tests.yaml channel: master version_file: flutter_master.version cores: "32" package_sharding: "--shardIndex 0 --shardCount 2" - name: Linux dart_unit_test_shard_2 master - # DO NOT LAND - for presubmit validation only. - #bringup: true # New target + bringup: true # New target recipe: packages/packages timeout: 60 properties: - # DO NOT LAND - for presubmit validation only. - target_file: linux_custom_package_tests.yaml + target_file: dart_unit_tests.yaml channel: master version_file: flutter_master.version cores: "32" package_sharding: "--shardIndex 1 --shardCount 2" - # DO NOT LAND - for adding to the real target. - # Android deps for tests that build Android. - # clang for tests that run the formatter. - dependencies: >- - [ - {"dependency": "android_sdk", "version": "version:33v6"}, - {"dependency": "open_jdk", "version": "version:11"}, - {"dependency": "curl", "version": "version:7.64.0"}, - {"dependency": "clang", "version": "git_revision:5d5aba78dbbee75508f01bcaa69aedb2ab79065a"} - ] - name: Linux dart_unit_test_shard_1 stable bringup: true # New target @@ -228,29 +214,40 @@ targets: channel: stable version_file: flutter_stable.version - - name: Linux custom_package_tests master + - name: Linux_android custom_package_tests master bringup: true # New target recipe: packages/packages - timeout: 60 + timeout: 30 properties: add_recipes_cq: "true" version_file: flutter_master.version target_file: linux_custom_package_tests.yaml cores: "32" + # Pigeon tests need Andoid deps (thus the Linux_android base) and + # clang-format. + dependencies: >- + [ + {"dependency": "clang", "version": "git_revision:5d5aba78dbbee75508f01bcaa69aedb2ab79065a"} + ] channel: master - - name: Linux custom_package_tests stable + - name: Linux_android custom_package_tests stable bringup: true # New target recipe: packages/packages - timeout: 60 + timeout: 30 properties: add_recipes_cq: "true" version_file: flutter_stable.version target_file: linux_custom_package_tests.yaml cores: "32" + # Pigeon tests need Andoid deps (thus the Linux_android base) and + # clang-format. + dependencies: >- + [ + {"dependency": "clang", "version": "git_revision:5d5aba78dbbee75508f01bcaa69aedb2ab79065a"} + ] channel: stable - ### Android tasks ### - name: Linux_android android_build_all_packages master recipe: packages/packages From c3d4f0153375a98556ce6661c1945172fccdbcfa Mon Sep 17 00:00:00 2001 From: stuartmorgan Date: Wed, 5 Jul 2023 22:46:34 -0400 Subject: [PATCH 9/9] Typo Co-authored-by: David Iglesias --- .ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci.yaml b/.ci.yaml index c137260c804..a08f72dfed5 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -240,7 +240,7 @@ targets: version_file: flutter_stable.version target_file: linux_custom_package_tests.yaml cores: "32" - # Pigeon tests need Andoid deps (thus the Linux_android base) and + # Pigeon tests need Android deps (thus the Linux_android base) and # clang-format. dependencies: >- [