[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:
stuartmorgan
2023-07-06 10:29:55 -04:00
committed by GitHub
parent 14d9a21617
commit 771ec9b42a
3 changed files with 25 additions and 9 deletions

View File

@ -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,
);

View File

@ -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',