Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 11 additions & 12 deletions dev/devicelab/lib/framework/ios.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,17 @@ const String _kTestXcconfigFileName = 'TestConfig.xcconfig';
const FileSystem _fs = const io.LocalFileSystem();

/// Patches the given Xcode project adding provisioning certificates and team
/// information required to build and run the project.
/// information required to build and run the project, if
/// FLUTTER_DEVICELAB_XCODE_PROVISIONING_CONFIG is set. If it is not set,
/// we rely on automatic signing by Xcode.
Future<Null> prepareProvisioningCertificates(String flutterProjectPath) async {
final String certificateConfig = await _readProvisioningConfigFile();
await _patchXcconfigFilesIfNotPatched(flutterProjectPath);
if (certificateConfig == null) {
// No cert config available, rely on automatic signing by Xcode.
return;
}

await _patchXcconfigFilesIfNotPatched(flutterProjectPath);
final File testXcconfig = _fs.file(path.join(flutterProjectPath, 'ios/Flutter/$_kTestXcconfigFileName'));
await testXcconfig.writeAsString(certificateConfig);
}
Expand Down Expand Up @@ -76,18 +82,11 @@ $specificMessage
}

if (!dart_io.Platform.environment.containsKey(_kProvisioningConfigFileEnvironmentVariable)) {
throwUsageError('''
print('''
$_kProvisioningConfigFileEnvironmentVariable variable is not defined in your
environment. Please, define it and try again.

Example provisioning xcconfig:

ProvisioningStyle=Manual
CODE_SIGN_IDENTITY=...
PROVISIONING_PROFILE=...
DEVELOPMENT_TEAM=...
PROVISIONING_PROFILE_SPECIFIER=...
environment. Relying on automatic signing by Xcode...
'''.trim());
return null;
}

final String filePath = dart_io.Platform.environment[_kProvisioningConfigFileEnvironmentVariable];
Expand Down
5 changes: 1 addition & 4 deletions dev/devicelab/lib/tasks/gallery.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,8 @@ class GalleryTransitionTest {
await inDirectory(galleryDirectory, () async {
await flutter('packages', options: <String>['get']);

if (deviceOperatingSystem == DeviceOperatingSystem.ios) {
if (deviceOperatingSystem == DeviceOperatingSystem.ios)
await prepareProvisioningCertificates(galleryDirectory.path);
// This causes an Xcode project to be created.
await flutter('build', options: <String>['ios', '--profile']);
}

final String testDriver = semanticsEnabled
? 'transitions_perf_with_semantics.dart'
Expand Down
5 changes: 1 addition & 4 deletions dev/devicelab/lib/tasks/integration_tests.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,8 @@ class DriverTest {
final String deviceId = device.deviceId;
await flutter('packages', options: <String>['get']);

if (deviceOperatingSystem == DeviceOperatingSystem.ios) {
if (deviceOperatingSystem == DeviceOperatingSystem.ios)
await prepareProvisioningCertificates(testDirectory);
// This causes an Xcode project to be created.
await flutter('build', options: <String>['ios', '--profile']);
}

await flutter('drive', options: <String>[
'-v',
Expand Down
5 changes: 1 addition & 4 deletions dev/devicelab/lib/tasks/integration_ui.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@ Future<TaskResult> runEndToEndTests() async {
await inDirectory(testDirectory, () async {
await flutter('packages', options: <String>['get']);

if (deviceOperatingSystem == DeviceOperatingSystem.ios) {
if (deviceOperatingSystem == DeviceOperatingSystem.ios)
await prepareProvisioningCertificates(testDirectory.path);
// This causes an Xcode project to be created.
await flutter('build', options: <String>['ios', 'lib/keyboard_resize.dart']);
}

await flutter('drive', options: <String>['-d', deviceId, '-t', 'lib/keyboard_resize.dart']);
});
Expand Down
26 changes: 4 additions & 22 deletions dev/devicelab/lib/tasks/perf_tests.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,37 +73,25 @@ TaskFunction createFlutterViewStartupTest() {
return new StartupTest(
'${flutterDirectory.path}/examples/flutter_view',
reportMetrics: false,
// This project has a non-standard CocoaPods Podfile. Run pod install
// before building the project.
runPodInstall: true,
);
}

/// Measure application startup performance.
class StartupTest {
static const Duration _startupTimeout = const Duration(minutes: 5);

const StartupTest(this.testDirectory, { this.reportMetrics: true, this.runPodInstall: false });
const StartupTest(this.testDirectory, { this.reportMetrics: true });

final String testDirectory;
final bool reportMetrics;
/// Used to trigger a `pod install` when the project has a custom Podfile and
/// flutter build ios won't automatically run `pod install` via the managed
/// plugin system.
final bool runPodInstall;

Future<TaskResult> call() async {
return await inDirectory(testDirectory, () async {
final String deviceId = (await devices.workingDevice).deviceId;
await flutter('packages', options: <String>['get']);

if (deviceOperatingSystem == DeviceOperatingSystem.ios) {
if (runPodInstall)
await runPodInstallForCustomPodfile(testDirectory);
if (deviceOperatingSystem == DeviceOperatingSystem.ios)
await prepareProvisioningCertificates(testDirectory);
// This causes an Xcode project to be created.
await flutter('build', options: <String>['ios', '--profile']);
}

await flutter('run', options: <String>[
'--verbose',
Expand Down Expand Up @@ -141,11 +129,8 @@ class PerfTest {
final String deviceId = device.deviceId;
await flutter('packages', options: <String>['get']);

if (deviceOperatingSystem == DeviceOperatingSystem.ios) {
if (deviceOperatingSystem == DeviceOperatingSystem.ios)
await prepareProvisioningCertificates(testDirectory);
// This causes an Xcode project to be created.
await flutter('build', options: <String>['ios', '--profile']);
}

await flutter('drive', options: <String>[
'-v',
Expand Down Expand Up @@ -280,11 +265,8 @@ class MemoryTest {
final String deviceId = device.deviceId;
await flutter('packages', options: <String>['get']);

if (deviceOperatingSystem == DeviceOperatingSystem.ios) {
if (deviceOperatingSystem == DeviceOperatingSystem.ios)
await prepareProvisioningCertificates(testDirectory);
// This causes an Xcode project to be created.
await flutter('build', options: <String>['ios', '--profile']);
}

final int observatoryPort = await findAvailablePort();

Expand Down
2 changes: 0 additions & 2 deletions dev/integration_tests/channels/ios/Flutter/Debug.xcconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
#include "Generated.xcconfig"

#include "TestConfig.xcconfig"
2 changes: 0 additions & 2 deletions dev/integration_tests/channels/ios/Flutter/Release.xcconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
#include "Generated.xcconfig"

#include "TestConfig.xcconfig"

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
objects = {

/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what's going on in this file.

3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
74970F741EDC3266000507F3 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 74970F731EDC3266000507F3 /* GeneratedPluginRegistrant.m */; };
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
Expand Down Expand Up @@ -39,10 +39,10 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };
74970F721EDC3266000507F3 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
74970F731EDC3266000507F3 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -91,6 +91,7 @@
9740EEB11CF90186004384FC /* Flutter */,
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
CF3B75C9A7D2FA2A4C99F110 /* Frameworks */,
);
sourceTree = "<group>";
};
Expand All @@ -105,15 +106,15 @@
97C146F01CF9000F007C117D /* Runner */ = {
isa = PBXGroup;
children = (
74970F721EDC3266000507F3 /* GeneratedPluginRegistrant.h */,
74970F731EDC3266000507F3 /* GeneratedPluginRegistrant.m */,
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
97C146FA1CF9000F007C117D /* Main.storyboard */,
97C146FD1CF9000F007C117D /* Assets.xcassets */,
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
97C147021CF9000F007C117D /* Info.plist */,
97C146F11CF9000F007C117D /* Supporting Files */,
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
);
path = Runner;
sourceTree = "<group>";
Expand Down Expand Up @@ -160,7 +161,6 @@
TargetAttributes = {
97C146ED1CF9000F007C117D = {
CreatedOnToolsVersion = 7.3.1;
DevelopmentTeam = ...;
};
};
};
Expand Down Expand Up @@ -237,7 +237,7 @@
files = (
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
97C146F31CF9000F007C117D /* main.m in Sources */,
74970F741EDC3266000507F3 /* GeneratedPluginRegistrant.m in Sources */,
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down