Pin customer_testing to the SHA specified in tests.version (#162048)
Closes https://github.com/flutter/flutter/issues/162041. I also converted the `.sh` and `.bat` files (largely) to Dart, mostly because I don't know enough Windows XP command prompt in order to make the change safely. They should still run the same from the CI bootstrapping, but most of the logic is now Dart code. Will send a separate PR to update the `flutter/tests` PR template. /cc @johnmccutchan @Piinks
This commit is contained in:
@@ -8,30 +8,28 @@
|
||||
# This is called from the LUCI recipes:
|
||||
# https://github.com/flutter/flutter/blob/main/dev/bots/suite_runners/run_customer_testing_tests.dart
|
||||
|
||||
set -ex
|
||||
set -e
|
||||
|
||||
function script_location() {
|
||||
local script_location="${BASH_SOURCE[0]}"
|
||||
# Resolve symlinks
|
||||
while [[ -h "$script_location" ]]; do
|
||||
DIR="$(cd -P "$( dirname "$script_location")" >/dev/null && pwd)"
|
||||
script_location="$(readlink "$script_location")"
|
||||
[[ "$script_location" != /* ]] && script_location="$DIR/$script_location"
|
||||
done
|
||||
cd -P "$(dirname "$script_location")" >/dev/null && pwd
|
||||
}
|
||||
|
||||
# So that users can run this script from anywhere and it will work as expected.
|
||||
cd "$(script_location)"
|
||||
|
||||
# This script does not assume that "flutter update-packages" has been
|
||||
# run, to allow CIs to save time by skipping that steps since it's
|
||||
# largely not needed to run the flutter/tests tests.
|
||||
#
|
||||
# However, we do need to update this directory and the tools directory.
|
||||
# However, we do need to update this directory.
|
||||
dart pub get
|
||||
(cd ../tools; dart pub get) # used for find_commit.dart below
|
||||
|
||||
# Next we need to update the flutter/tests checkout.
|
||||
#
|
||||
# We use find_commit.dart so that we pull the version of flutter/tests
|
||||
# that was contemporary when the branch we are on was created. That
|
||||
# way, we can still run the tests on long-lived branches without being
|
||||
# affected by breaking changes on trunk causing changes to the tests
|
||||
# that wouldn't work on the long-lived branch.
|
||||
#
|
||||
# (This also prevents trunk from suddenly failing when tests are
|
||||
# revved on flutter/tests -- if you rerun a passing customer_tests
|
||||
# shard, it should still pass, even if we rolled one of the tests.)
|
||||
rm -rf ../../bin/cache/pkg/tests
|
||||
git clone https://github.com/flutter/tests.git ../../bin/cache/pkg/tests
|
||||
git -C ../../bin/cache/pkg/tests checkout `dart --enable-asserts ../tools/bin/find_commit.dart . master ../../bin/cache/pkg/tests main`
|
||||
|
||||
# Finally, run the tests.
|
||||
dart --enable-asserts run_tests.dart --skip-on-fetch-failure --skip-template ../../bin/cache/pkg/tests/registry/*.test
|
||||
# Run the cross-platform script.
|
||||
../../bin/dart run ci.dart
|
||||
|
||||
Reference in New Issue
Block a user