mirror of
https://github.com/flutter/packages.git
synced 2025-05-23 03:36:45 +08:00
[ci] Enable LUCI Dart unit tests (#4378)
Enables the new LUCI Dart unit tests. There is no corresponding Cirrus removal because that test was accidentally removed early in https://github.com/flutter/packages/pull/4352. Part of https://github.com/flutter/flutter/issues/114373
This commit is contained in:
12
.ci.yaml
12
.ci.yaml
@ -93,10 +93,10 @@ targets:
|
||||
version_file: flutter_master.version
|
||||
|
||||
- name: Linux dart_unit_test_shard_1 master
|
||||
bringup: true # New target
|
||||
recipe: packages/packages
|
||||
timeout: 60
|
||||
properties:
|
||||
add_recipes_cq: "true"
|
||||
target_file: dart_unit_tests.yaml
|
||||
channel: master
|
||||
version_file: flutter_master.version
|
||||
@ -104,10 +104,10 @@ targets:
|
||||
package_sharding: "--shardIndex 0 --shardCount 2"
|
||||
|
||||
- name: Linux dart_unit_test_shard_2 master
|
||||
bringup: true # New target
|
||||
recipe: packages/packages
|
||||
timeout: 60
|
||||
properties:
|
||||
add_recipes_cq: "true"
|
||||
target_file: dart_unit_tests.yaml
|
||||
channel: master
|
||||
version_file: flutter_master.version
|
||||
@ -115,7 +115,6 @@ targets:
|
||||
package_sharding: "--shardIndex 1 --shardCount 2"
|
||||
|
||||
- name: Linux dart_unit_test_shard_1 stable
|
||||
bringup: true # New target
|
||||
recipe: packages/packages
|
||||
timeout: 60
|
||||
properties:
|
||||
@ -126,7 +125,6 @@ targets:
|
||||
package_sharding: "--shardIndex 0 --shardCount 2"
|
||||
|
||||
- name: Linux dart_unit_test_shard_2 stable
|
||||
bringup: true # New target
|
||||
recipe: packages/packages
|
||||
timeout: 60
|
||||
properties:
|
||||
@ -137,10 +135,10 @@ targets:
|
||||
package_sharding: "--shardIndex 1 --shardCount 2"
|
||||
|
||||
- name: Linux_web web_dart_unit_test_shard_1 master
|
||||
bringup: true # New target
|
||||
recipe: packages/packages
|
||||
timeout: 60
|
||||
properties:
|
||||
add_recipes_cq: "true"
|
||||
target_file: web_dart_unit_tests.yaml
|
||||
channel: master
|
||||
version_file: flutter_master.version
|
||||
@ -148,10 +146,10 @@ targets:
|
||||
package_sharding: "--shardIndex 0 --shardCount 2"
|
||||
|
||||
- name: Linux_web web_dart_unit_test_shard_2 master
|
||||
bringup: true # New target
|
||||
recipe: packages/packages
|
||||
timeout: 60
|
||||
properties:
|
||||
add_recipes_cq: "true"
|
||||
target_file: web_dart_unit_tests.yaml
|
||||
channel: master
|
||||
version_file: flutter_master.version
|
||||
@ -159,7 +157,6 @@ targets:
|
||||
package_sharding: "--shardIndex 1 --shardCount 2"
|
||||
|
||||
- name: Linux_web web_dart_unit_test_shard_1 stable
|
||||
bringup: true # New target
|
||||
recipe: packages/packages
|
||||
timeout: 60
|
||||
properties:
|
||||
@ -170,7 +167,6 @@ targets:
|
||||
package_sharding: "--shardIndex 0 --shardCount 2"
|
||||
|
||||
- name: Linux_web web_dart_unit_test_shard_2 stable
|
||||
bringup: true # New target
|
||||
recipe: packages/packages
|
||||
timeout: 60
|
||||
properties:
|
||||
|
@ -118,7 +118,9 @@ class DartTestCommand extends PackageLoopingCommand {
|
||||
'test',
|
||||
'--color',
|
||||
if (experiment.isNotEmpty) '--enable-experiment=$experiment',
|
||||
if (platform != null) '--platform=$platform',
|
||||
// Flutter defaults to VM mode (under a different name) and explicitly
|
||||
// setting it is deprecated, so pass nothing in that case.
|
||||
if (platform != null && platform != 'vm') '--platform=$platform',
|
||||
],
|
||||
workingDir: package.directory,
|
||||
);
|
||||
|
@ -231,6 +231,24 @@ void main() {
|
||||
]));
|
||||
});
|
||||
|
||||
test('converts --platform=vm to no argument for flutter test', () async {
|
||||
final RepositoryPackage plugin = createFakePlugin(
|
||||
'some_plugin',
|
||||
packagesDir,
|
||||
extraFiles: <String>['test/empty_test.dart'],
|
||||
);
|
||||
|
||||
await runCapturingPrint(runner, <String>['dart-test', '--platform=vm']);
|
||||
|
||||
expect(
|
||||
processRunner.recordedCalls,
|
||||
orderedEquals(<ProcessCall>[
|
||||
ProcessCall(getFlutterCommand(mockPlatform),
|
||||
const <String>['test', '--color'], plugin.path),
|
||||
]),
|
||||
);
|
||||
});
|
||||
|
||||
test('runs in Chrome when requested for Flutter package', () async {
|
||||
final RepositoryPackage package = createFakePackage(
|
||||
'a_package',
|
||||
|
Reference in New Issue
Block a user