Unverified Commit 4329bea9 authored by Jenn Magder's avatar Jenn Magder Committed by GitHub

Compress module_test_ios xcresult (#75736)

parent 8f3a6245
...@@ -291,10 +291,12 @@ Future<void> main() async { ...@@ -291,10 +291,12 @@ Future<void> main() async {
} }
section('Run platform unit tests'); 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) {
simulatorDeviceId = deviceId; simulatorDeviceId = deviceId;
final String resultBundlePath = path.join(resultBundleTemp, 'result');
final String resultBundlePath = path.join(hostAgent.dumpDirectory.path, 'module_test_ios-objc-${DateTime.now().toLocal().toIso8601String()}');
return inDirectory(objectiveCHostApp, () => return inDirectory(objectiveCHostApp, () =>
exec( exec(
'xcodebuild', 'xcodebuild',
...@@ -320,6 +322,22 @@ Future<void> main() async { ...@@ -320,6 +322,22 @@ Future<void> main() async {
} }
); );
// 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.
);
});
section('Fail building existing Objective-C iOS app if flutter script fails'); section('Fail building existing Objective-C iOS app if flutter script fails');
final String xcodebuildOutput = await inDirectory<String>(objectiveCHostApp, () => final String xcodebuildOutput = await inDirectory<String>(objectiveCHostApp, () =>
eval( eval(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment