Migrate fuchsia_precache to shard tests. (#139202)

Adhoc tests are being deprecated and existing tests are being migrated to shard tests.

Bug: https://github.com/flutter/flutter/issues/139153
This commit is contained in:
godofredoc 2023-11-29 16:03:23 -08:00 committed by GitHub
parent 4648f54430
commit c8101b56a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 2 deletions

View file

@ -681,8 +681,7 @@ targets:
recipe: flutter/flutter
timeout: 60
properties:
validation: fuchsia_precache
validation_name: Fuchsia precache
shard: fuchsia_precache
tags: >
["framework", "hostonly", "shard", "linux"]

View file

@ -265,6 +265,7 @@ Future<void> main(List<String> args) async {
'realm_checker': _runRealmCheckerTest,
'customer_testing': _runCustomerTesting,
'analyze': _runAnalyze,
'fuchsia_precache': _runFuchsiaPrecache,
kTestHarnessShardName: _runTestHarnessTests, // Used for testing this script; also run as part of SHARD=framework_tests, SUBSHARD=misc.
});
} catch (error, stackTrace) {
@ -1602,6 +1603,31 @@ Future<void> _runAnalyze() async {
);
}
// Runs flutter_precache.
Future<void> _runFuchsiaPrecache() async {
printProgress('${green}Running flutter precache tests$reset');
await runCommand(
'flutter',
<String>[
'config',
'--enable-fuchsia',
],
workingDirectory: flutterRoot,
);
await runCommand(
'flutter',
<String>[
'precache',
'--flutter_runner',
'--fuchsia',
'--no-android',
'--no-ios',
'--force',
],
workingDirectory: flutterRoot,
);
}
/// Runs the skp_generator from the flutter/tests repo.
///
/// See also the customer_tests shard.