Refactor fuchsia_precache (#145978)
Refactor fuchsia_precache suite in order to reduce testing logic in test.dart and allow for later implementing package:test onto the existing fuchsia_precache tests Part of https://github.com/flutter/flutter/issues/145482
This commit is contained in:
parent
a9eff9f4f4
commit
b304740076
31
dev/bots/suite_runners/run_fuchsia_precache.dart
Normal file
31
dev/bots/suite_runners/run_fuchsia_precache.dart
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
import '../run_command.dart';
|
||||||
|
import '../utils.dart';
|
||||||
|
|
||||||
|
// Runs flutter_precache.
|
||||||
|
Future<void> fuchsiaPrecacheRunner(String flutterRoot) async {
|
||||||
|
printProgress('${green}Running flutter precache tests$reset');
|
||||||
|
await runCommand(
|
||||||
|
'flutter',
|
||||||
|
const <String>[
|
||||||
|
'config',
|
||||||
|
'--enable-fuchsia',
|
||||||
|
],
|
||||||
|
workingDirectory: flutterRoot,
|
||||||
|
);
|
||||||
|
await runCommand(
|
||||||
|
'flutter',
|
||||||
|
const <String>[
|
||||||
|
'precache',
|
||||||
|
'--flutter_runner',
|
||||||
|
'--fuchsia',
|
||||||
|
'--no-android',
|
||||||
|
'--no-ios',
|
||||||
|
'--force',
|
||||||
|
],
|
||||||
|
workingDirectory: flutterRoot,
|
||||||
|
);
|
||||||
|
}
|
@ -69,6 +69,7 @@ import 'suite_runners/run_analyze_tests.dart';
|
|||||||
import 'suite_runners/run_customer_testing_tests.dart';
|
import 'suite_runners/run_customer_testing_tests.dart';
|
||||||
import 'suite_runners/run_docs_tests.dart';
|
import 'suite_runners/run_docs_tests.dart';
|
||||||
import 'suite_runners/run_flutter_packages_tests.dart';
|
import 'suite_runners/run_flutter_packages_tests.dart';
|
||||||
|
import 'suite_runners/run_fuchsia_precache.dart';
|
||||||
import 'suite_runners/run_realm_checker_tests.dart';
|
import 'suite_runners/run_realm_checker_tests.dart';
|
||||||
import 'suite_runners/run_skp_generator_tests.dart';
|
import 'suite_runners/run_skp_generator_tests.dart';
|
||||||
import 'suite_runners/run_web_long_running_tests.dart';
|
import 'suite_runners/run_web_long_running_tests.dart';
|
||||||
@ -256,7 +257,7 @@ Future<void> main(List<String> args) async {
|
|||||||
'realm_checker': () => realmCheckerTestRunner(flutterRoot),
|
'realm_checker': () => realmCheckerTestRunner(flutterRoot),
|
||||||
'customer_testing': () => customerTestingRunner(flutterRoot),
|
'customer_testing': () => customerTestingRunner(flutterRoot),
|
||||||
'analyze': () => analyzeRunner(flutterRoot),
|
'analyze': () => analyzeRunner(flutterRoot),
|
||||||
'fuchsia_precache': _runFuchsiaPrecache,
|
'fuchsia_precache': () => fuchsiaPrecacheRunner(flutterRoot),
|
||||||
'docs': () => docsRunner(flutterRoot),
|
'docs': () => docsRunner(flutterRoot),
|
||||||
'verify_binaries_codesigned': _runVerifyCodesigned,
|
'verify_binaries_codesigned': _runVerifyCodesigned,
|
||||||
kTestHarnessShardName: _runTestHarnessTests, // Used for testing this script; also run as part of SHARD=framework_tests, SUBSHARD=misc.
|
kTestHarnessShardName: _runTestHarnessTests, // Used for testing this script; also run as part of SHARD=framework_tests, SUBSHARD=misc.
|
||||||
@ -1199,31 +1200,6 @@ Future<void> _runWebUnitTests(String webRenderer, bool useWasm) async {
|
|||||||
await selectSubshard(subshards);
|
await selectSubshard(subshards);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Verifies binaries are codesigned.
|
// Verifies binaries are codesigned.
|
||||||
Future<void> _runVerifyCodesigned() async {
|
Future<void> _runVerifyCodesigned() async {
|
||||||
printProgress('${green}Running binaries codesign verification$reset');
|
printProgress('${green}Running binaries codesign verification$reset');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user