-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure Xcode project is setup to start debugger (#136977)
Some users have their Xcode settings set to not debug (see example here flutter/flutter#136197 (comment)). This will cause the [engine check for a debugger](https://github.com/flutter/engine/blob/22ce5c6a45e2898b4ce348c514b5fa42ca25bc88/runtime/ptrace_check.cc#L56-L71) to fail, which will cause an error and cause the app to crash. This PR parses the scheme file to ensure the scheme is set to start a debugger and warn the user if it's not. Fixes flutter/flutter#136197.
- Loading branch information
Showing
11 changed files
with
385 additions
and
9 deletions.
There are no files selected for viewing
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
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
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,52 @@ | ||
// 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 'package:flutter_devicelab/framework/devices.dart'; | ||
import 'package:flutter_devicelab/framework/framework.dart'; | ||
import 'package:flutter_devicelab/framework/task_result.dart'; | ||
import 'package:flutter_devicelab/framework/utils.dart'; | ||
import 'package:flutter_devicelab/tasks/integration_tests.dart'; | ||
|
||
Future<void> main() async { | ||
deviceOperatingSystem = DeviceOperatingSystem.ios; | ||
await task(() async { | ||
await createFlavorsTest(environment: <String, String>{ | ||
'FORCE_XCODE_DEBUG': 'true', | ||
}).call(); | ||
await createIntegrationTestFlavorsTest(environment: <String, String>{ | ||
'FORCE_XCODE_DEBUG': 'true', | ||
}).call(); | ||
// test install and uninstall of flavors app | ||
final TaskResult installTestsResult = await inDirectory( | ||
'${flutterDirectory.path}/dev/integration_tests/flavors', | ||
() async { | ||
await flutter( | ||
'install', | ||
options: <String>['--flavor', 'paid'], | ||
); | ||
await flutter( | ||
'install', | ||
options: <String>['--flavor', 'paid', '--uninstall-only'], | ||
); | ||
final StringBuffer stderr = StringBuffer(); | ||
await evalFlutter( | ||
'install', | ||
canFail: true, | ||
stderr: stderr, | ||
options: <String>['--flavor', 'bogus'], | ||
); | ||
|
||
final String stderrString = stderr.toString(); | ||
if (!stderrString.contains('The Xcode project defines schemes: free, paid')) { | ||
print(stderrString); | ||
return TaskResult.failure('Should not succeed with bogus flavor'); | ||
} | ||
|
||
return TaskResult.success(null); | ||
}, | ||
); | ||
|
||
return installTestsResult; | ||
}); | ||
} |
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
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
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
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
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
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
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
Oops, something went wrong.