diff --git a/dev/bots/suite_runners/run_add_to_app_life_cycle_tests.dart b/dev/bots/suite_runners/run_add_to_app_life_cycle_tests.dart new file mode 100644 index 00000000000..7e9ff835dbc --- /dev/null +++ b/dev/bots/suite_runners/run_add_to_app_life_cycle_tests.dart @@ -0,0 +1,23 @@ +// 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 'dart:io' show Platform; + +import 'package:path/path.dart' as path; + +import '../run_command.dart'; +import '../utils.dart'; + +Future addToAppLifeCycleRunner(String flutterRoot) 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'); + await runCommand('./build_and_test.sh', + [], + workingDirectory: addToAppDir, + ); + } else { + throw Exception('Only iOS has add-to-add lifecycle tests at this time.'); + } +} diff --git a/dev/bots/test.dart b/dev/bots/test.dart index 08397226977..d163dd87070 100644 --- a/dev/bots/test.dart +++ b/dev/bots/test.dart @@ -66,6 +66,7 @@ import 'package:process/process.dart'; import 'browser.dart'; import 'run_command.dart'; import 'service_worker_test.dart'; +import 'suite_runners/run_add_to_app_life_cycle_tests.dart'; import 'tool_subsharding.dart'; import 'utils.dart'; @@ -230,7 +231,7 @@ Future main(List args) async { printProgress('Running task: ${Platform.environment[CIRRUS_TASK_NAME]}'); } await selectShard({ - 'add_to_app_life_cycle_tests': _runAddToAppLifeCycleTests, + 'add_to_app_life_cycle_tests': () => addToAppLifeCycleRunner(flutterRoot), 'build_tests': _runBuildTests, 'framework_coverage': _runFrameworkCoverage, 'framework_tests': _runFrameworkTests, @@ -790,19 +791,6 @@ Future _flutterBuildDart2js(String relativePathToApplication, String targe ); } -Future _runAddToAppLifeCycleTests() 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'); - await runCommand('./build_and_test.sh', - [], - workingDirectory: addToAppDir, - ); - } else { - printProgress('${yellow}Skipped on this platform (only iOS has add-to-add lifecycle tests at this time).$reset'); - } -} - Future _runFrameworkTests() async { final List trackWidgetCreationAlternatives = ['--track-widget-creation', '--no-track-widget-creation'];