Unverified Commit 88eca6c1 authored by Jenn Magder's avatar Jenn Magder Committed by GitHub

Fail integration test if expected bitcode markers not found (#102016)

parent fecc8904
......@@ -462,7 +462,7 @@ end
if ((await fileType(builtFlutterBinary)).contains('armv7')) {
throw TaskResult.failure('Unexpected armv7 architecture slice in $builtFlutterBinary');
}
await containsBitcode(builtFlutterBinary);
await checkContainsBitcode(builtFlutterBinary);
final String builtAppBinary = path.join(
archivedAppPath,
......@@ -474,7 +474,7 @@ end
if ((await fileType(builtAppBinary)).contains('armv7')) {
throw TaskResult.failure('Unexpected armv7 architecture slice in $builtAppBinary');
}
await containsBitcode(builtAppBinary);
await checkContainsBitcode(builtAppBinary);
// The host app example builds plugins statically, url_launcher_ios.framework
// should not exist.
......
......@@ -8,6 +8,7 @@ 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);
......@@ -84,6 +85,12 @@ 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`.
///
......
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