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
050d49ae
Unverified
Commit
050d49ae
authored
Feb 18, 2021
by
Jenn Magder
Committed by
GitHub
Feb 18, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload logs before failing module_test_ios (#76341)
parent
2659d6d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
37 deletions
+41
-37
module_test_ios.dart
dev/devicelab/bin/tasks/module_test_ios.dart
+41
-37
No files found.
dev/devicelab/bin/tasks/module_test_ios.dart
View file @
050d49ae
...
...
@@ -295,49 +295,53 @@ Future<void> main() async {
section
(
'Run platform unit tests'
);
final
String
resultBundleTemp
=
Directory
.
systemTemp
.
createTempSync
(
'module_test_ios_xcresult.'
).
path
;
await
testWithNewIOSSimulator
(
'TestAdd2AppSim'
,
(
String
deviceId
)
{
await
testWithNewIOSSimulator
(
'TestAdd2AppSim'
,
(
String
deviceId
)
async
{
simulatorDeviceId
=
deviceId
;
final
String
resultBundlePath
=
path
.
join
(
resultBundleTemp
,
'result'
);
return
inDirectory
(
objectiveCHostApp
,
()
=>
exec
(
'xcodebuild'
,
<
String
>[
'-workspace'
,
'Host.xcworkspace'
,
'-scheme'
,
'Host'
,
'-configuration'
,
'Debug'
,
'-destination'
,
'id=
$deviceId
'
,
'-resultBundlePath'
,
resultBundlePath
,
'test'
,
'CODE_SIGNING_ALLOWED=NO'
,
'CODE_SIGNING_REQUIRED=NO'
,
'CODE_SIGN_IDENTITY=-'
,
'EXPANDED_CODE_SIGN_IDENTITY=-'
,
'COMPILER_INDEX_STORE_ENABLE=NO'
,
],
));
}
);
// Zip the test results to the artifacts directory for upload.
await
inDirectory
(
resultBundleTemp
,
()
{
final
String
zipPath
=
path
.
join
(
hostAgent
.
dumpDirectory
.
path
,
'module_test_ios-objc-
${DateTime.now().toLocal().toIso8601String()}
.zip'
);
return
exec
(
'zip'
,
final
int
testResultExit
=
await
exec
(
'xcodebuild'
,
<
String
>[
'-r'
,
'-9'
,
zipPath
,
'result.xcresult'
,
'-workspace'
,
'Host.xcworkspace'
,
'-scheme'
,
'Host'
,
'-configuration'
,
'Debug'
,
'-destination'
,
'id=
$deviceId
'
,
'-resultBundlePath'
,
resultBundlePath
,
'test'
,
'CODE_SIGNING_ALLOWED=NO'
,
'CODE_SIGNING_REQUIRED=NO'
,
'CODE_SIGN_IDENTITY=-'
,
'EXPANDED_CODE_SIGN_IDENTITY=-'
,
'COMPILER_INDEX_STORE_ENABLE=NO'
,
],
canFail:
true
,
// Best effort to get the logs.
workingDirectory:
objectiveCHostApp
.
path
,
canFail:
true
,
);
if
(
testResultExit
!=
0
)
{
// Zip the test results to the artifacts directory for upload.
await
inDirectory
(
resultBundleTemp
,
()
{
final
String
zipPath
=
path
.
join
(
hostAgent
.
dumpDirectory
.
path
,
'module_test_ios-objc-
${DateTime.now().toLocal().toIso8601String()}
.zip'
);
return
exec
(
'zip'
,
<
String
>[
'-r'
,
'-9'
,
zipPath
,
'result.xcresult'
,
],
canFail:
true
,
// Best effort to get the logs.
);
});
throw
TaskResult
.
failure
(
'Platform unit tests failed'
);
}
});
section
(
'Fail building existing Objective-C iOS app if flutter script fails'
);
...
...
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