Skip to content

Commit 3ee1d46

Browse files
authored
Check for either ios-x86_64-simulator or ios-arm64_x86_64-simulator in module test (flutter#85051)
1 parent eafadd8 commit 3ee1d46

1 file changed

Lines changed: 20 additions & 8 deletions

File tree

dev/devicelab/bin/tasks/build_ios_framework_module_test.dart

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -270,24 +270,36 @@ Future<void> _testBuildIosFramework(Directory projectDir, { bool isModule = fals
270270

271271
await _checkBitcode(engineFrameworkPath, mode);
272272

273-
checkFileExists(path.join(
273+
// TODO(jmagman): Remove ios-x86_64-simulator checks when the ARM simulator engine artifacts rolls.
274+
final String x86SimulatorFramework = path.join(
274275
outputPath,
275276
mode,
276277
'Flutter.xcframework',
277278
'ios-x86_64-simulator',
278279
'Flutter.framework',
279-
'Flutter',
280-
));
280+
);
281281

282-
checkFileExists(path.join(
282+
final String x86ArmSimulatorFramework = path.join(
283283
outputPath,
284284
mode,
285285
'Flutter.xcframework',
286-
'ios-x86_64-simulator',
286+
'ios-arm64_x86_64-simulator',
287287
'Flutter.framework',
288-
'Headers',
289-
'Flutter.h',
290-
));
288+
);
289+
290+
final bool x86SimulatorBinaryExists = exists(File(path.join(x86SimulatorFramework, 'Flutter')));
291+
final bool x86ArmSimulatorBinaryExists = exists(File(path.join(x86ArmSimulatorFramework, 'Flutter')));
292+
293+
if (!x86SimulatorBinaryExists && !x86ArmSimulatorBinaryExists) {
294+
throw TaskResult.failure('Expected Flutter engine artifact binary to exist');
295+
}
296+
297+
final bool x86SimulatorHeaderExists = exists(File(path.join(x86SimulatorFramework, 'Headers', 'Flutter.h')));
298+
final bool x86ArmSimulatorHeaderExists = exists(File(path.join(x86ArmSimulatorFramework, 'Headers', 'Flutter.h')));
299+
300+
if (!x86SimulatorHeaderExists && !x86ArmSimulatorHeaderExists) {
301+
throw TaskResult.failure('Expected Flutter.h engine artifact to exist');
302+
}
291303
}
292304

293305
section('Check all modes have plugins');

0 commit comments

Comments
 (0)