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
2d08fec3
Unverified
Commit
2d08fec3
authored
Jul 16, 2019
by
xster
Committed by
GitHub
Jul 16, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move buildable module test to a module test (#36102)
parent
8ec730c3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
102 additions
and
11 deletions
+102
-11
module_test_ios.dart
dev/devicelab/bin/tasks/module_test_ios.dart
+101
-4
build_and_test.sh
dev/integration_tests/ios_add2app/build_and_test.sh
+1
-7
No files found.
dev/devicelab/bin/tasks/module_test_ios.dart
View file @
2d08fec3
...
...
@@ -32,7 +32,7 @@ Future<void> main() async {
});
await
prepareProvisioningCertificates
(
projectDir
.
path
);
section
(
'Build ephemeral host app without CocoaPods'
);
section
(
'Build ephemeral host app
in release mode
without CocoaPods'
);
await
inDirectory
(
projectDir
,
()
async
{
await
flutter
(
...
...
@@ -41,18 +41,96 @@ Future<void> main() async {
);
});
final
bool
ephemeralHostAppBuilt
=
exists
(
Directory
(
path
.
join
(
final
Directory
ephemeralReleaseHostApp
=
Directory
(
path
.
join
(
projectDir
.
path
,
'build'
,
'ios'
,
'iphoneos'
,
'Runner.app'
,
))
)
;
));
if
(!
e
phemeralHostAppBuilt
)
{
if
(!
e
xists
(
ephemeralReleaseHostApp
)
)
{
return
TaskResult
.
failure
(
'Failed to build ephemeral host .app'
);
}
if
(!
await
_isAppAotBuild
(
ephemeralReleaseHostApp
))
{
return
TaskResult
.
failure
(
'Ephemeral host app
${ephemeralReleaseHostApp.path}
was not a release build as expected'
);
}
section
(
'Clean build'
);
await
inDirectory
(
projectDir
,
()
async
{
await
flutter
(
'clean'
);
});
section
(
'Build ephemeral host app in profile mode without CocoaPods'
);
await
inDirectory
(
projectDir
,
()
async
{
await
flutter
(
'build'
,
options:
<
String
>[
'ios'
,
'--no-codesign'
,
'--profile'
],
);
});
final
Directory
ephemeralProfileHostApp
=
Directory
(
path
.
join
(
projectDir
.
path
,
'build'
,
'ios'
,
'iphoneos'
,
'Runner.app'
,
));
if
(!
exists
(
ephemeralProfileHostApp
))
{
return
TaskResult
.
failure
(
'Failed to build ephemeral host .app'
);
}
if
(!
await
_isAppAotBuild
(
ephemeralProfileHostApp
))
{
return
TaskResult
.
failure
(
'Ephemeral host app
${ephemeralProfileHostApp.path}
was not a profile build as expected'
);
}
section
(
'Clean build'
);
await
inDirectory
(
projectDir
,
()
async
{
await
flutter
(
'clean'
);
});
section
(
'Build ephemeral host app in debug mode for simulator without CocoaPods'
);
await
inDirectory
(
projectDir
,
()
async
{
await
flutter
(
'build'
,
options:
<
String
>[
'ios'
,
'--no-codesign'
,
'--simulator'
,
'--debug'
],
);
});
final
Directory
ephemeralDebugHostApp
=
Directory
(
path
.
join
(
projectDir
.
path
,
'build'
,
'ios'
,
'iphonesimulator'
,
'Runner.app'
,
));
if
(!
exists
(
ephemeralDebugHostApp
))
{
return
TaskResult
.
failure
(
'Failed to build ephemeral host .app'
);
}
if
(!
exists
(
File
(
path
.
join
(
ephemeralDebugHostApp
.
path
,
'Frameworks'
,
'App.framework'
,
'flutter_assets'
,
'isolate_snapshot_data'
,
))))
{
return
TaskResult
.
failure
(
'Ephemeral host app
${ephemeralDebugHostApp.path}
was not a debug build as expected'
);
}
section
(
'Clean build'
);
await
inDirectory
(
projectDir
,
()
async
{
...
...
@@ -179,3 +257,22 @@ Future<void> main() async {
}
});
}
Future
<
bool
>
_isAppAotBuild
(
Directory
app
)
async
{
final
String
binary
=
path
.
join
(
app
.
path
,
'Frameworks'
,
'App.framework'
,
'App'
);
final
String
symbolTable
=
await
eval
(
'nm'
,
<
String
>
[
'-gU'
,
binary
,
],
);
return
symbolTable
.
contains
(
'kDartIsolateSnapshotInstructions'
);
}
dev/integration_tests/ios_add2app/build_and_test.sh
View file @
2d08fec3
...
...
@@ -5,13 +5,7 @@ set -e
cd
"
$(
dirname
"
$0
"
)
"
pushd
flutterapp
../../../../bin/flutter build ios
--debug
--no-codesign
-v
pushd
.ios
xcodebuild
-workspace
Runner.xcworkspace
-scheme
Runner
-destination
generic/platform
=
iOS
-configuration
Debug
CODE_SIGNING_REQUIRED
=
NO
CODE_SIGNING_IDENTITY
=
""
CODE_SIGNING_ALLOWED
=
NO
xcodebuild
-workspace
Runner.xcworkspace
-scheme
Runner
-destination
generic/platform
=
iOS
-configuration
Profile
CODE_SIGNING_REQUIRED
=
NO
CODE_SIGNING_IDENTITY
=
""
CODE_SIGNING_ALLOWED
=
NO
xcodebuild
-workspace
Runner.xcworkspace
-scheme
Runner
-destination
generic/platform
=
iOS
-configuration
Release
CODE_SIGNING_REQUIRED
=
NO
CODE_SIGNING_IDENTITY
=
""
CODE_SIGNING_ALLOWED
=
NO
popd
../../../../bin/flutter build ios
--debug
--simulator
--no-codesign
popd
pod
install
...
...
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