Skip to content

Commit 8c69ffc

Browse files
committed
Run tests for package:rfw on stable as well.
For non-master-channel builds, the run_tests.sh script runs but doesn't bother checking the actual coverage, since I expect Dart's coverage logic to diverge in master and so we'd have to have per-channel covered line counts, and that way lies madness. No version change: Only affects how tests are run, not a public-facing change. No CHANGELOG change: Only affects how tests are run, not a public-facing change.
1 parent a7b028e commit 8c69ffc

File tree

2 files changed

+10
-34
lines changed

2 files changed

+10
-34
lines changed

.cirrus.yml

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -85,18 +85,8 @@ task:
8585
script:
8686
# extension_google_sign_in_as_googleapis_auth is currently not building, see
8787
# https://github.com/flutter/flutter/issues/89301
88-
# rfw is excluded until the next Flutter stable release because it depends
89-
# on features that have never shipped to stable. (The rfw package has
90-
# never worked on stable so this is not going to break anyone.)
91-
# When updating this, also look at the ios tests below.
92-
# When updating this, also update the `rfw/run_tests.sh` file.
93-
- if [[ "$CHANNEL" == "master" ]]; then
94-
- ./script/tool_runner.sh build-examples --apk --exclude=extension_google_sign_in_as_googleapis_auth
95-
- ./script/tool_runner.sh native-test --android --no-integration
96-
- else
97-
- ./script/tool_runner.sh build-examples --apk --exclude=extension_google_sign_in_as_googleapis_auth,rfw
98-
- ./script/tool_runner.sh native-test --android --no-integration --exclude=rfw
99-
- fi
88+
- ./script/tool_runner.sh build-examples --apk --exclude=extension_google_sign_in_as_googleapis_auth
89+
- ./script/tool_runner.sh native-test --android --no-integration
10090
depends_on:
10191
- format+analyze
10292
- name: web_benchmarks_test
@@ -127,16 +117,7 @@ task:
127117
CHANNEL: "stable"
128118
<< : *FLUTTER_UPGRADE_TEMPLATE
129119
build_script:
130-
# Exclude rfw until the next Flutter stable release because it depends
131-
# on features that have never shipped to stable. (The rfw package has
132-
# never worked on stable so this is not going to break anyone.)
133-
# When updating this, also look at the android tests above.
134-
# When updating this, also update the `rfw/run_tests.sh` file.
135-
- if [[ "$CHANNEL" == "master" ]]; then
136-
- ./script/tool_runner.sh build-examples --ios
137-
- else
138-
- ./script/tool_runner.sh build-examples --ios --exclude=rfw
139-
- fi
120+
- ./script/tool_runner.sh build-examples --ios
140121

141122
task:
142123
name: local_tests

packages/rfw/test_coverage/bin/test_coverage.dart

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,6 @@ const String lastUpdate = '2021-08-30';
1515
Future<void> main(List<String> arguments) async {
1616
// This script is mentioned in the README.md file.
1717

18-
if (Platform.environment['CHANNEL'] == 'stable') {
19-
// For now these are disabled because this package has never been supported
20-
// on the stable channel and requires newer language features that have not
21-
// yet shipped to a stable build. It will be possible to test this with the
22-
// first stable to ship after October 2021.
23-
print(
24-
'Skipping tests on stable channel.\n'
25-
'These tests can be unskipped once we ship a stable after October 2021.',
26-
);
27-
exit(0);
28-
}
29-
3018
final Directory coverageDirectory = Directory('coverage');
3119

3220
if (coverageDirectory.existsSync()) {
@@ -45,9 +33,16 @@ Future<void> main(List<String> arguments) async {
4533
print(result.stdout);
4634
print(result.stderr);
4735
print('Tests failed.');
36+
// leave coverage directory around to aid debugging
4837
exit(1);
4938
}
5039

40+
if (Platform.environment['CHANNEL'] != 'master') {
41+
print('Tests passed. (Coverage verification skipped; not on master channel.)');
42+
coverageDirectory.deleteSync(recursive: true);
43+
exit(0);
44+
}
45+
5146
final List<lcov.Record> records = await lcov.Parser.parse(
5247
'coverage/lcov.info',
5348
);

0 commit comments

Comments
 (0)