Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 62613dd

Browse files
Remove all but one use of tool_runner.sh
1 parent 31ba457 commit 62613dd

File tree

2 files changed

+31
-25
lines changed

2 files changed

+31
-25
lines changed

.cirrus.yml

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ only_if: $CIRRUS_TAG == ''
66
env:
77
CHANNEL: "master" # Default to master when not explicitly set by a task.
88
PLUGIN_TOOL: "./script/tool/bin/flutter_plugin_tools.dart"
9+
# The base command for most tool invocations, handling:
10+
# - running the correct set of packages for the current branch
11+
# - including any sharding that is configured for a task via $PLUGIN_SHARDING
12+
TOOL_COMMAND_BASE: dart $PLUGIN_TOOL --packages-for-branch $PLUGIN_SHARDING
913

1014
tool_setup_template: &TOOL_SETUP_TEMPLATE
1115
tool_setup_script:
@@ -68,19 +72,19 @@ task:
6872
- cd script/tool
6973
- CIRRUS_BUILD_ID=null pub run test
7074
- name: publishable
71-
version_check_script: ./script/tool_runner.sh version-check
72-
publish_check_script: ./script/tool_runner.sh publish-check
75+
version_check_script: $TOOL_COMMAND_BASE version-check
76+
publish_check_script: $TOOL_COMMAND_BASE publish-check
7377
- name: format
74-
format_script: ./script/tool_runner.sh format --fail-on-change
75-
pubspec_script: ./script/tool_runner.sh pubspec-check
78+
format_script: $TOOL_COMMAND_BASE format --fail-on-change
79+
pubspec_script: $TOOL_COMMAND_BASE pubspec-check
7680
license_script: dart $PLUGIN_TOOL license-check
7781
- name: test
7882
env:
7983
matrix:
8084
CHANNEL: "master"
8185
CHANNEL: "stable"
8286
test_script:
83-
- ./script/tool_runner.sh test
87+
- $TOOL_COMMAND_BASE test
8488
- name: analyze
8589
env:
8690
matrix:
@@ -92,7 +96,7 @@ task:
9296
script:
9397
# DO NOT change the custom-analysis argument here without changing the Dart repo.
9498
# See the comment in script/configs/custom_analysis.yaml for details.
95-
- ./script/tool_runner.sh analyze --custom-analysis=script/configs/custom_analysis.yaml
99+
- $TOOL_COMMAND_BASE analyze --custom-analysis=script/configs/custom_analysis.yaml
96100
### Android tasks ###
97101
- name: build_all_plugins_apk
98102
env:
@@ -126,9 +130,9 @@ task:
126130
CHANNEL: "stable"
127131
build_script:
128132
- flutter config --enable-linux-desktop
129-
- ./script/tool_runner.sh build-examples --linux
133+
- $TOOL_COMMAND_BASE build-examples --linux
130134
drive_script:
131-
- xvfb-run ./script/tool_runner.sh drive-examples --linux
135+
- xvfb-run $TOOL_COMMAND_BASE drive-examples --linux
132136

133137
# Heavy-workload Linux tasks.
134138
# These use machines with more CPUs and memory, so will reduce parallelization
@@ -164,14 +168,14 @@ task:
164168
# TODO(stuartmorgan): See https://github.com/flutter/flutter/issues/24935
165169
- export CIRRUS_CHANGE_MESSAGE=""
166170
- export CIRRUS_COMMIT_MESSAGE=""
167-
- ./script/tool_runner.sh build-examples --apk
171+
- $TOOL_COMMAND_BASE build-examples --apk
168172
lint_script:
169173
# Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they
170174
# might include non-ASCII characters which makes Gradle crash.
171175
# TODO(stuartmorgan): See https://github.com/flutter/flutter/issues/24935
172176
- export CIRRUS_CHANGE_MESSAGE=""
173177
- export CIRRUS_COMMIT_MESSAGE=""
174-
- ./script/tool_runner.sh lint-android # must come after build-examples
178+
- $TOOL_COMMAND_BASE lint-android # must come after build-examples
175179
native_unit_test_script:
176180
# Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they
177181
# might include non-ASCII characters which makes Gradle crash.
@@ -180,7 +184,7 @@ task:
180184
- export CIRRUS_COMMIT_MESSAGE=""
181185
# Native integration tests are handled by firebase-test-lab below, so
182186
# only run unit tests.
183-
- ./script/tool_runner.sh native-test --android --no-integration # must come after apk build
187+
- $TOOL_COMMAND_BASE native-test --android --no-integration # must come after apk build
184188
firebase_test_lab_script:
185189
# Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they
186190
# might include non-ASCII characters which makes Gradle crash.
@@ -189,7 +193,7 @@ task:
189193
- export CIRRUS_COMMIT_MESSAGE=""
190194
- if [[ -n "$GCLOUD_FIREBASE_TESTLAB_KEY" ]]; then
191195
- echo $GCLOUD_FIREBASE_TESTLAB_KEY > ${HOME}/gcloud-service-key.json
192-
- ./script/tool_runner.sh firebase-test-lab --device model=flame,version=29 --device model=starqlteue,version=26 --exclude=script/configs/exclude_integration_android.yaml
196+
- $TOOL_COMMAND_BASE firebase-test-lab --device model=flame,version=29 --device model=starqlteue,version=26 --exclude=script/configs/exclude_integration_android.yaml
193197
- else
194198
- echo "This user does not have permission to run Firebase Test Lab tests."
195199
- fi
@@ -212,9 +216,9 @@ task:
212216
- dart lib/web_driver_installer.dart chromedriver --install-only
213217
- ./chromedriver/chromedriver --port=4444 &
214218
build_script:
215-
- ./script/tool_runner.sh build-examples --web
219+
- $TOOL_COMMAND_BASE build-examples --web
216220
drive_script:
217-
- ./script/tool_runner.sh drive-examples --web --exclude=script/configs/exclude_integration_web.yaml
221+
- $TOOL_COMMAND_BASE drive-examples --web --exclude=script/configs/exclude_integration_web.yaml
218222

219223
# macOS tasks.
220224
task:
@@ -224,7 +228,7 @@ task:
224228
### iOS+macOS tasks ***
225229
- name: lint_darwin_plugins
226230
script:
227-
- ./script/tool_runner.sh podspecs
231+
- $TOOL_COMMAND_BASE podspecs
228232
### iOS tasks ###
229233
- name: build_all_plugins_ipa
230234
env:
@@ -249,16 +253,16 @@ task:
249253
- xcrun simctl list
250254
- xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-11 com.apple.CoreSimulator.SimRuntime.iOS-14-5 | xargs xcrun simctl boot
251255
build_script:
252-
- ./script/tool_runner.sh build-examples --ios
256+
- $TOOL_COMMAND_BASE build-examples --ios
253257
xcode_analyze_script:
254-
- ./script/tool_runner.sh xcode-analyze --ios
258+
- $TOOL_COMMAND_BASE xcode-analyze --ios
255259
native_test_script:
256-
- ./script/tool_runner.sh native-test --ios --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=latest"
260+
- $TOOL_COMMAND_BASE native-test --ios --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=latest"
257261
drive_script:
258262
# `drive-examples` contains integration tests, which changes the UI of the application.
259263
# This UI change sometimes affects `xctest`.
260264
# So we run `drive-examples` after `native-test`; changing the order will result ci failure.
261-
- ./script/tool_runner.sh drive-examples --ios --exclude=script/configs/exclude_integration_ios.yaml
265+
- $TOOL_COMMAND_BASE drive-examples --ios --exclude=script/configs/exclude_integration_ios.yaml
262266
### macOS desktop tasks ###
263267
- name: build_all_plugins_macos
264268
env:
@@ -277,10 +281,10 @@ task:
277281
PATH: $PATH:/usr/local/bin
278282
build_script:
279283
- flutter config --enable-macos-desktop
280-
- ./script/tool_runner.sh build-examples --macos
284+
- $TOOL_COMMAND_BASE build-examples --macos
281285
xcode_analyze_script:
282-
- ./script/tool_runner.sh xcode-analyze --macos
286+
- $TOOL_COMMAND_BASE xcode-analyze --macos
283287
native_test_script:
284-
- ./script/tool_runner.sh native-test --macos --exclude=script/configs/exclude_native_macos.yaml
288+
- $TOOL_COMMAND_BASE native-test --macos --exclude=script/configs/exclude_native_macos.yaml
285289
drive_script:
286-
- ./script/tool_runner.sh drive-examples --macos
290+
- $TOOL_COMMAND_BASE drive-examples --macos

script/configs/custom_analysis.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88
# from a top-level package into more specific packages in order to incrementally
99
# migrate a federated plugin.
1010
#
11-
# DO NOT move or delete this file without updating
11+
# DO NOT move or delete this file without updating both
1212
# https://github.com/dart-lang/sdk/blob/master/tools/bots/flutter/analyze_flutter_plugins.sh
13-
# which references this file from source, but out-of-repo.
13+
# and
14+
# https://github.com/flutter/flutter/blob/master/dev/bots/test.dart
15+
# which reference this file from source, but out-of-repo.
1416
# Contact stuartmorgan or devoncarew for assistance if necessary.
1517

1618
# TODO(ecosystem): Remove everything from this list. See:

0 commit comments

Comments
 (0)