Skip to content

Commit 9ec04ac

Browse files
[ci] Add LUCI version of dart unit tests (flutter#4265)
Add initial LUCI versions of the dart unit tests task. Part of flutter#114373
1 parent 71997a4 commit 9ec04ac

3 files changed

Lines changed: 73 additions & 0 deletions

File tree

.ci.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,50 @@ targets:
9292
channel: master
9393
version_file: flutter_master.version
9494

95+
- name: Linux dart_unit_test_shard_1 master
96+
bringup: true # New target
97+
recipe: packages/packages
98+
timeout: 60
99+
properties:
100+
target_file: dart_unit_tests.yaml
101+
channel: master
102+
version_file: flutter_master.version
103+
cores: "32"
104+
package_sharding: "--shardIndex 0 --shardCount 2"
105+
106+
- name: Linux dart_unit_test_shard_2 master
107+
bringup: true # New target
108+
recipe: packages/packages
109+
timeout: 60
110+
properties:
111+
target_file: dart_unit_tests.yaml
112+
channel: master
113+
version_file: flutter_master.version
114+
cores: "32"
115+
package_sharding: "--shardIndex 1 --shardCount 2"
116+
117+
- name: Linux dart_unit_test_shard_1 stable
118+
bringup: true # New target
119+
recipe: packages/packages
120+
timeout: 60
121+
properties:
122+
target_file: dart_unit_tests.yaml
123+
channel: stable
124+
version_file: flutter_stable.version
125+
cores: "32"
126+
package_sharding: "--shardIndex 0 --shardCount 2"
127+
128+
- name: Linux dart_unit_test_shard_2 stable
129+
bringup: true # New target
130+
recipe: packages/packages
131+
timeout: 60
132+
properties:
133+
target_file: dart_unit_tests.yaml
134+
channel: stable
135+
version_file: flutter_stable.version
136+
cores: "32"
137+
package_sharding: "--shardIndex 1 --shardCount 2"
138+
95139
- name: Linux analyze master
96140
recipe: packages/packages
97141
timeout: 30
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
# Copyright 2013 The Flutter Authors. All rights reserved.
3+
# Use of this source code is governed by a BSD-style license that can be
4+
# found in the LICENSE file.
5+
set -e
6+
7+
# Pathify the dependencies on changed packages (excluding major version
8+
# changes, which won't affect clients).
9+
./script/tool_runner.sh make-deps-path-based --target-dependencies-with-non-breaking-updates
10+
# This uses --run-on-dirty-packages rather than --packages-for-branch
11+
# since only the packages changed by 'make-deps-path-based' need to be
12+
# re-checked.
13+
dart ./script/tool/bin/flutter_plugin_tools.dart dart-test --run-on-dirty-packages \
14+
--log-timing --exclude=script/configs/dart_unit_tests_exceptions.yaml \
15+
$PACKAGE_SHARDING
16+
# Restore the tree to a clean state, to avoid accidental issues if
17+
# other script steps are added to the enclosing task.
18+
git checkout .

.ci/targets/dart_unit_tests.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
tasks:
2+
- name: prepare tool
3+
script: .ci/scripts/prepare_tool.sh
4+
- name: Dart unit tests
5+
script: script/tool_runner.sh
6+
args: ["dart-test", "--exclude=script/configs/dart_unit_tests_exceptions.yaml"]
7+
# Re-run tests with path-based dependencies to ensure that publishing
8+
# the changes won't break tests of other packages in the respository
9+
# that depend on it.
10+
- name: Dart unit tests - pathified
11+
script: .ci/scripts/dart_unit_tests_pathified.sh

0 commit comments

Comments
 (0)