Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
a4530b7c
Unverified
Commit
a4530b7c
authored
Aug 30, 2022
by
Jenn Magder
Committed by
GitHub
Aug 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make module tests pass on Xcode 14 (#110556)
parent
253e3c08
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
57 deletions
+26
-57
build_ios_framework_module_test.dart
dev/devicelab/bin/tasks/build_ios_framework_module_test.dart
+26
-48
module_test_ios.dart
dev/devicelab/bin/tasks/module_test_ios.dart
+0
-2
ios.dart
dev/devicelab/lib/framework/ios.dart
+0
-7
No files found.
dev/devicelab/bin/tasks/build_ios_framework_module_test.dart
View file @
a4530b7c
...
...
@@ -101,28 +101,14 @@ Future<void> _testBuildIosFramework(Directory projectDir, { bool isModule = fals
final
String
outputPath
=
path
.
join
(
projectDir
.
path
,
outputDirectoryName
);
// TODO(jmagman): Remove ios-arm64_armv7 checks when armv7 engine artifacts are removed.
final
String
arm64FlutterFramework
=
path
.
join
(
checkFileExists
(
path
.
join
(
outputPath
,
'Debug'
,
'Flutter.xcframework'
,
'ios-arm64'
,
'Flutter.framework'
,
);
final
String
armv7FlutterFramework
=
path
.
join
(
outputPath
,
'Debug'
,
'Flutter.xcframework'
,
'ios-arm64_armv7'
,
'Flutter.framework'
,
);
final
bool
arm64FlutterBinaryExists
=
exists
(
File
(
path
.
join
(
arm64FlutterFramework
,
'Flutter'
)));
final
bool
armv7FlutterBinaryExists
=
exists
(
File
(
path
.
join
(
armv7FlutterFramework
,
'Flutter'
)));
if
(!
arm64FlutterBinaryExists
&&
!
armv7FlutterBinaryExists
)
{
throw
TaskResult
.
failure
(
'Expected debug Flutter engine artifact binary to exist'
);
}
'Flutter'
,
));
final
String
debugAppFrameworkPath
=
path
.
join
(
outputPath
,
...
...
@@ -225,8 +211,7 @@ Future<void> _testBuildIosFramework(Directory projectDir, { bool isModule = fals
section
(
"Check all modes' engine dylib"
);
for
(
final
String
mode
in
<
String
>[
'Debug'
,
'Profile'
,
'Release'
])
{
// TODO(jmagman): Remove ios-arm64_armv7 checks when armv7 engine artifacts are removed.
final
String
arm64EngineBinary
=
path
.
join
(
final
String
engineBinary
=
path
.
join
(
outputPath
,
mode
,
'Flutter.xcframework'
,
...
...
@@ -234,23 +219,7 @@ Future<void> _testBuildIosFramework(Directory projectDir, { bool isModule = fals
'Flutter.framework'
,
'Flutter'
,
);
final
String
arm64Armv7EngineBinary
=
path
.
join
(
outputPath
,
mode
,
'Flutter.xcframework'
,
'ios-arm64_armv7'
,
'Flutter.framework'
,
'Flutter'
,
);
if
(
exists
(
File
(
arm64EngineBinary
)))
{
await
_checkBitcode
(
arm64EngineBinary
,
mode
);
}
else
if
(
exists
(
File
(
arm64Armv7EngineBinary
)))
{
await
_checkBitcode
(
arm64Armv7EngineBinary
,
mode
);
}
else
{
throw
TaskResult
.
failure
(
'Expected Flutter
$mode
engine artifact binary to exist'
);
}
await
_checkBitcode
(
engineBinary
,
mode
);
checkFileExists
(
path
.
join
(
outputPath
,
...
...
@@ -285,12 +254,21 @@ Future<void> _testBuildIosFramework(Directory projectDir, { bool isModule = fals
);
await
_checkDylib
(
pluginFrameworkPath
);
await
_checkBitcode
(
pluginFrameworkPath
,
mode
);
if
(!
await
_linksOnFlutter
(
pluginFrameworkPath
))
{
throw
TaskResult
.
failure
(
'
$pluginFrameworkPath
does not link on Flutter'
);
}
// TODO(jmagman): Remove ios-arm64_armv7 checks when CI is updated to Xcode 14.
final
String
transitiveDependencyFrameworkPath
=
path
.
join
(
outputPath
,
mode
,
'Reachability.xcframework'
,
'ios-arm64'
,
'Reachability.framework'
,
'Reachability'
,
);
final
String
armv7TransitiveDependencyFrameworkPath
=
path
.
join
(
outputPath
,
mode
,
'Reachability.xcframework'
,
...
...
@@ -298,8 +276,17 @@ Future<void> _testBuildIosFramework(Directory projectDir, { bool isModule = fals
'Reachability.framework'
,
'Reachability'
,
);
if
(
await
_linksOnFlutter
(
transitiveDependencyFrameworkPath
))
{
throw
TaskResult
.
failure
(
'Transitive dependency
$transitiveDependencyFrameworkPath
unexpectedly links on Flutter'
);
final
bool
transitiveDependencyExists
=
exists
(
File
(
transitiveDependencyFrameworkPath
));
final
bool
armv7TransitiveDependencyExists
=
exists
(
File
(
armv7TransitiveDependencyFrameworkPath
));
if
(!
transitiveDependencyExists
&&
!
armv7TransitiveDependencyExists
)
{
throw
TaskResult
.
failure
(
'Expected debug Flutter engine artifact binary to exist'
);
}
if
((
transitiveDependencyExists
&&
await
_linksOnFlutter
(
transitiveDependencyFrameworkPath
))
||
(
armv7TransitiveDependencyExists
&&
await
_linksOnFlutter
(
armv7TransitiveDependencyFrameworkPath
)))
{
throw
TaskResult
.
failure
(
'Transitive dependency
$transitiveDependencyFrameworkPath
unexpectedly links on Flutter'
);
}
checkFileExists
(
path
.
join
(
...
...
@@ -346,14 +333,6 @@ Future<void> _testBuildIosFramework(Directory projectDir, { bool isModule = fals
checkFileExists
(
simulatorFrameworkHeaderPath
);
}
checkDirectoryExists
(
path
.
join
(
outputPath
,
'Release'
,
'connectivity.xcframework'
,
'ios-arm64'
,
'BCSymbolMaps'
,
));
section
(
'Check all modes have generated plugin registrant'
);
for
(
final
String
mode
in
<
String
>[
'Debug'
,
'Profile'
,
'Release'
])
{
...
...
@@ -369,7 +348,6 @@ Future<void> _testBuildIosFramework(Directory projectDir, { bool isModule = fals
'FlutterPluginRegistrant'
,
);
await
_checkStatic
(
registrantFrameworkPath
);
await
_checkBitcode
(
registrantFrameworkPath
,
mode
);
checkFileExists
(
path
.
join
(
outputPath
,
...
...
dev/devicelab/bin/tasks/module_test_ios.dart
View file @
a4530b7c
...
...
@@ -421,7 +421,6 @@ end
if
((
await
fileType
(
builtFlutterBinary
)).
contains
(
'armv7'
))
{
throw
TaskResult
.
failure
(
'Unexpected armv7 architecture slice in
$builtFlutterBinary
'
);
}
await
checkContainsBitcode
(
builtFlutterBinary
);
final
String
builtAppBinary
=
path
.
join
(
archivedAppPath
,
...
...
@@ -433,7 +432,6 @@ end
if
((
await
fileType
(
builtAppBinary
)).
contains
(
'armv7'
))
{
throw
TaskResult
.
failure
(
'Unexpected armv7 architecture slice in
$builtAppBinary
'
);
}
await
checkContainsBitcode
(
builtAppBinary
);
// The host app example builds plugins statically, url_launcher_ios.framework
// should not exist.
...
...
dev/devicelab/lib/framework/ios.dart
View file @
a4530b7c
...
...
@@ -8,7 +8,6 @@ import 'dart:io';
import
'package:path/path.dart'
as
path
;
import
'host_agent.dart'
;
import
'task_result.dart'
;
import
'utils.dart'
;
typedef
SimulatorFunction
=
Future
<
void
>
Function
(
String
deviceId
);
...
...
@@ -85,12 +84,6 @@ Future<bool> containsBitcode(String pathToBinary) async {
return
!
emptyBitcodeMarkerFound
;
}
Future
<
void
>
checkContainsBitcode
(
String
pathToBinary
)
async
{
if
(!
await
containsBitcode
(
pathToBinary
))
{
throw
TaskResult
.
failure
(
'Expected bitcode in
$pathToBinary
'
);
}
}
/// Creates and boots a new simulator, passes the new simulator's identifier to
/// `testFunction`.
///
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment