mirror of
https://github.com/flutter/flutter
synced 2024-08-24 18:36:03 +00:00
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:
parent
7433225a95
commit
ece6ac2bb6
|
@ -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');
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue