Refactor add_to_app_life_cycle_tests (#145546)

Refactor add_to_app_life_cycle_tests in order to reduce testing logic in test.dart, create a suite_runners directory and allow for later implementing package:test onto add_to_app_life_cycle_tests

Part of https://github.com/flutter/flutter/issues/145482
This commit is contained in:
Jesse
2024-03-25 18:44:58 -04:00
committed by GitHub
parent b05937d3dc
commit 2832611da8
2 changed files with 25 additions and 14 deletions

View File

@@ -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<void> 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',
<String>[],
workingDirectory: addToAppDir,
);
} else {
throw Exception('Only iOS has add-to-add lifecycle tests at this time.');
}
}