Skip to content

Commit 8fcd997

Browse files
[pigeon] Convert run_tests.sh to Dart (#3075)
* Remove test_pigeon_android, which is unused * Update Dart unit test output names for consistency * Simplify unit test generation * Fold dart analysis tests into the dart unit test system, which already does analysis * Move Java unit tests to Dart * Remove more dead code, consolidate slightly * Move legacy iOS unit tests to Dart * Move command-line tests from bash to Dart * Move default test set to Dart; eliminate sh * Update docs reference to script * Fix legacy iOS test * Disable iOS integration tests
1 parent 2b7c60a commit 8fcd997

File tree

11 files changed

+210
-711
lines changed

11 files changed

+210
-711
lines changed

.cirrus.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,14 +191,12 @@ task:
191191
CHANNEL: "stable"
192192
<< : *INSTALL_CHROME_LINUX
193193
local_tests_script:
194-
# pigeon tests currently don't support Linux:
195-
# https://github.com/flutter/flutter/issues/100386
196194
# flutter_image
197195
# https://github.com/flutter/flutter/issues/100387
198196
- if [[ "$CHANNEL" == "master" ]]; then
199-
- ./script/tool_runner.sh custom-test --exclude=pigeon
197+
- ./script/tool_runner.sh custom-test
200198
- else
201-
- ./script/tool_runner.sh custom-test --exclude=pigeon,flutter_image
199+
- ./script/tool_runner.sh custom-test --exclude=flutter_image
202200
- fi
203201
### Web tasks ###
204202
- name: web-build_all_packages

packages/pigeon/CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ generators with that AST.
3434

3535
## Testing Overview
3636

37-
Pigeon has 3 types of tests, you'll find them all in [run_tests.sh](./run_tests.sh).
37+
Pigeon has 3 types of tests, you'll find them all in
38+
[run_tests.dart](./tool/run_tests.dart).
3839

3940
* Unit tests - These are the fastest tests that are just typical unit tests,
4041
they may be generating code and checking it against a regular expression to
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# TODO(stuartmorgan) Remove this file when these are no longer generated;
2+
# see the TODO in _runFlutterUnitTests in run_tests.dart
3+
async_handlers.gen.dart
4+
host2flutter.gen.dart
5+
list.gen.dart
6+
void_arg_flutter.gen.dart
7+
void_arg_host.gen.dart
8+
voidflutter.gen.dart
9+
voidhost.gen.dart

packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/all_datatypes.dart

Lines changed: 0 additions & 252 deletions
This file was deleted.

packages/pigeon/platform_tests/flutter_null_safe_unit_tests/test/null_safe_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import 'dart:async';
66

77
import 'package:flutter/services.dart';
88
import 'package:flutter_test/flutter_test.dart';
9-
import 'package:flutter_unit_tests/null_safe_pigeon.dart';
9+
import 'package:flutter_unit_tests/flutter_unittests.gen.dart';
1010
import 'package:flutter_unit_tests/nullable_returns.gen.dart';
1111
import 'package:mockito/annotations.dart';
1212
import 'package:mockito/mockito.dart';

packages/pigeon/platform_tests/flutter_null_safe_unit_tests/test/primitive_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import 'package:flutter/services.dart';
66
import 'package:flutter_test/flutter_test.dart';
7-
import 'package:flutter_unit_tests/primitive.dart';
7+
import 'package:flutter_unit_tests/primitive.gen.dart';
88
import 'package:mockito/annotations.dart';
99
import 'package:mockito/mockito.dart';
1010

packages/pigeon/platform_tests/flutter_null_safe_unit_tests/test/primitive_test.mocks.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import 'dart:typed_data' as _i2;
77
import 'dart:ui' as _i5;
88

99
import 'package:flutter/src/services/binary_messenger.dart' as _i3;
10-
import 'package:flutter_unit_tests/primitive.dart' as _i6;
10+
import 'package:flutter_unit_tests/primitive.gen.dart' as _i6;
1111
import 'package:mockito/mockito.dart' as _i1;
1212

1313
// ignore_for_file: comment_references

0 commit comments

Comments
 (0)