Unverified Commit 050d49ae authored by Jenn Magder's avatar Jenn Magder Committed by GitHub

Upload logs before failing module_test_ios (#76341)

parent 2659d6d1
......@@ -295,12 +295,11 @@ 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(
final int testResultExit = await exec(
'xcodebuild',
<String>[
'-workspace',
......@@ -320,10 +319,11 @@ Future<void> main() async {
'EXPANDED_CODE_SIGN_IDENTITY=-',
'COMPILER_INDEX_STORE_ENABLE=NO',
],
));
}
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,
......@@ -340,6 +340,10 @@ Future<void> main() async {
);
});
throw TaskResult.failure('Platform unit tests failed');
}
});
section('Fail building existing Objective-C iOS app if flutter script fails');
final String xcodebuildOutput = await inDirectory<String>(objectiveCHostApp, () =>
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