Clean up flutterRoot (#147010)

The flutterroot param is accessible from the util function after the recent refactor of utils https://github.com/flutter/flutter/pull/146592 so this change cleans up the references to the suite runners to make them simpler. 

Part of https://github.com/flutter/flutter/issues/145482
This commit is contained in:
Jesse 2024-04-18 18:33:08 -04:00 committed by GitHub
parent 7433225a95
commit ece6ac2bb6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 18 additions and 19 deletions

View file

@ -9,7 +9,7 @@ import 'package:path/path.dart' as path;
import '../run_command.dart';
import '../utils.dart';
Future<void> addToAppLifeCycleRunner(String flutterRoot) async {
Future<void> addToAppLifeCycleRunner() async {
if (Platform.isMacOS) {
printProgress('${green}Running add-to-app life cycle iOS integration tests$reset...');
final String addToAppDir = path.join(flutterRoot, 'dev', 'integration_tests', 'ios_add2app_life_cycle');

View file

@ -7,7 +7,7 @@ import 'package:path/path.dart' as path;
import '../run_command.dart';
import '../utils.dart';
Future<void> analyzeRunner(String flutterRoot) async {
Future<void> analyzeRunner() async {
printProgress('${green}Running analysis testing$reset');
await runCommand(
'dart',

View file

@ -9,7 +9,7 @@ import 'package:path/path.dart' as path;
import '../run_command.dart';
import '../utils.dart';
Future<void> customerTestingRunner(String flutterRoot) async {
Future<void> customerTestingRunner() async {
printProgress('${green}Running customer testing$reset');
await runCommand(
'git',

View file

@ -5,7 +5,7 @@
import '../run_command.dart';
import '../utils.dart';
Future<void> docsRunner(String flutterRoot) async {
Future<void> docsRunner() async {
printProgress('${green}Running flutter doc tests$reset');
await runCommand(
'./dev/bots/docs.sh',

View file

@ -12,7 +12,7 @@ import '../run_command.dart';
import '../utils.dart';
/// Executes the test suite for the flutter/packages repo.
Future<void> flutterPackagesRunner(String flutterRoot) async {
Future<void> flutterPackagesRunner() async {
Future<void> runAnalyze() async {
printProgress('${green}Running analysis for flutter/packages$reset');

View file

@ -6,7 +6,7 @@ import '../run_command.dart';
import '../utils.dart';
// Runs flutter_precache.
Future<void> fuchsiaPrecacheRunner(String flutterRoot) async {
Future<void> fuchsiaPrecacheRunner() async {
printProgress('${green}Running flutter precache tests$reset');
await runCommand(
'flutter',

View file

@ -8,7 +8,7 @@ import 'package:path/path.dart' as path;
import '../utils.dart';
Future<void> realmCheckerTestRunner(String flutterRoot) async {
Future<void> realmCheckerTestRunner() async {
final String engineRealmFile = path.join(flutterRoot, 'bin', 'internal', 'engine.realm');
final String engineRealm = File(engineRealmFile).readAsStringSync().trim();

View file

@ -12,7 +12,7 @@ import 'package:process/process.dart';
import '../run_command.dart';
import '../utils.dart';
Future<void> verifyCodesignedTestRunner(String flutterRoot) async {
Future<void> verifyCodesignedTestRunner() async {
printProgress('${green}Running binaries codesign verification$reset');
await runCommand(
'flutter',

View file

@ -17,7 +17,7 @@ typedef ShardRunner = Future<void> Function();
class WebTestsSuite {
WebTestsSuite(this.flutterRoot, this.flutterTestArgs);
WebTestsSuite(this.flutterTestArgs);
/// Tests that we don't run on Web.
///
@ -87,7 +87,6 @@ class WebTestsSuite {
static const List<String> _kAllBuildModes = <String>['debug', 'profile', 'release'];
final String flutterRoot;
final List<String> flutterTestArgs;
/// Coarse-grained integration tests running on the Web.

View file

@ -136,9 +136,9 @@ Future<void> main(List<String> args) async {
if (Platform.environment.containsKey(CIRRUS_TASK_NAME)) {
printProgress('Running task: ${Platform.environment[CIRRUS_TASK_NAME]}');
}
final WebTestsSuite webTestsSuite = WebTestsSuite(flutterRoot, flutterTestArgs);
final WebTestsSuite webTestsSuite = WebTestsSuite(flutterTestArgs);
await selectShard(<String, ShardRunner>{
'add_to_app_life_cycle_tests': () => addToAppLifeCycleRunner(flutterRoot),
'add_to_app_life_cycle_tests': addToAppLifeCycleRunner,
'build_tests': _runBuildTests,
'framework_coverage': frameworkCoverageRunner,
'framework_tests': _runFrameworkTests,
@ -156,14 +156,14 @@ Future<void> main(List<String> args) async {
'web_skwasm_tests': webTestsSuite.runWebSkwasmUnitTests,
// All web integration tests
'web_long_running_tests': webTestsSuite.webLongRunningTestsRunner,
'flutter_plugins': () => flutterPackagesRunner(flutterRoot),
'flutter_plugins': flutterPackagesRunner,
'skp_generator': skpGeneratorTestsRunner,
'realm_checker': () => realmCheckerTestRunner(flutterRoot),
'customer_testing': () => customerTestingRunner(flutterRoot),
'analyze': () => analyzeRunner(flutterRoot),
'fuchsia_precache': () => fuchsiaPrecacheRunner(flutterRoot),
'docs': () => docsRunner(flutterRoot),
'verify_binaries_codesigned': () => verifyCodesignedTestRunner(flutterRoot),
'realm_checker': realmCheckerTestRunner,
'customer_testing': customerTestingRunner,
'analyze': analyzeRunner,
'fuchsia_precache': fuchsiaPrecacheRunner,
'docs': docsRunner,
'verify_binaries_codesigned': verifyCodesignedTestRunner,
kTestHarnessShardName: _runTestHarnessTests, // Used for testing this script; also run as part of SHARD=framework_tests, SUBSHARD=misc.
});
} catch (error, stackTrace) {