forked from flutter/packages
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 flutter/flutter#145482
- Loading branch information
Showing
2 changed files
with
25 additions
and
14 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
dev/bots/suite_runners/run_add_to_app_life_cycle_tests.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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.'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters