Convert idevicescreenshot and upgradePbxProjWithFlutterAssets tests to testWithoutContext (#53208)
This commit is contained in:
@@ -66,7 +66,7 @@ class IMobileDevice {
|
||||
|
||||
/// Captures a screenshot to the specified outputFile.
|
||||
Future<void> takeScreenshot(File outputFile) {
|
||||
return processUtils.run(
|
||||
return _processUtils.run(
|
||||
<String>[
|
||||
_idevicescreenshotPath,
|
||||
outputFile.path,
|
||||
@@ -87,7 +87,7 @@ Future<XcodeBuildResult> buildXcodeProject({
|
||||
DarwinArch activeArch,
|
||||
bool codesign = true,
|
||||
}) async {
|
||||
if (!upgradePbxProjWithFlutterAssets(app.project)) {
|
||||
if (!upgradePbxProjWithFlutterAssets(app.project, globals.logger)) {
|
||||
return XcodeBuildResult(success: false);
|
||||
}
|
||||
|
||||
@@ -562,7 +562,7 @@ bool _checkXcodeVersion() {
|
||||
}
|
||||
|
||||
// TODO(jmagman): Refactor to IOSMigrator.
|
||||
bool upgradePbxProjWithFlutterAssets(IosProject project) {
|
||||
bool upgradePbxProjWithFlutterAssets(IosProject project, Logger logger) {
|
||||
final File xcodeProjectFile = project.xcodeProjectInfoFile;
|
||||
assert(xcodeProjectFile.existsSync());
|
||||
final List<String> lines = xcodeProjectFile.readAsLinesSync();
|
||||
@@ -575,7 +575,7 @@ bool upgradePbxProjWithFlutterAssets(IosProject project) {
|
||||
final Match match = oldAssets.firstMatch(line);
|
||||
if (match != null) {
|
||||
if (printedStatuses.add(match.group(1))) {
|
||||
globals.printStatus('Removing obsolete reference to ${match.group(1)} from ${project.hostAppBundleName}');
|
||||
logger.printStatus('Removing obsolete reference to ${match.group(1)} from ${project.hostAppBundleName}');
|
||||
}
|
||||
} else {
|
||||
buffer.writeln(line);
|
||||
|
||||
Reference in New Issue
Block a user