Set the CONFIGURATION_BUILD_DIR in generated xcconfig when debugging core device (#134493)
Xcode uses the CONFIGURATION_BUILD_DIR build setting to determine the location of the bundle to build and install. When launching an app via Xcode with the Xcode debug workflow (for iOS 17 physical devices), temporarily set the CONFIGURATION_BUILD_DIR to the location of the bundle so Xcode can find it. Also, added a Xcode Debug version of the `microbenchmarks_ios` integration test since it uses `flutter run --profile` without using `--use-application-binary`. Fixes https://github.com/flutter/flutter/issues/134186.
This commit is contained in:
committed by
GitHub
parent
4d5a1d91e1
commit
af5ac930d8
21
dev/devicelab/bin/tasks/microbenchmarks_ios_xcode_debug.dart
Normal file
21
dev/devicelab/bin/tasks/microbenchmarks_ios_xcode_debug.dart
Normal file
@@ -0,0 +1,21 @@
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter_devicelab/framework/devices.dart';
|
||||
import 'package:flutter_devicelab/framework/framework.dart';
|
||||
import 'package:flutter_devicelab/tasks/microbenchmarks.dart';
|
||||
|
||||
/// Runs microbenchmarks on iOS.
|
||||
Future<void> main() async {
|
||||
// XcodeDebug workflow is used for CoreDevices (iOS 17+ and Xcode 15+). Use
|
||||
// FORCE_XCODE_DEBUG environment variable to force the use of XcodeDebug
|
||||
// workflow in CI to test from older versions since devicelab has not yet been
|
||||
// updated to iOS 17 and Xcode 15.
|
||||
deviceOperatingSystem = DeviceOperatingSystem.ios;
|
||||
await task(createMicrobenchmarkTask(
|
||||
environment: <String, String>{
|
||||
'FORCE_XCODE_DEBUG': 'true',
|
||||
},
|
||||
));
|
||||
}
|
||||
@@ -64,6 +64,12 @@ Future<Map<String, double>> readJsonResults(Process process) {
|
||||
// See https://github.com/flutter/flutter/issues/19208
|
||||
process.stdin.write('q');
|
||||
await process.stdin.flush();
|
||||
|
||||
// Give the process a couple of seconds to exit and run shutdown hooks
|
||||
// before sending kill signal.
|
||||
// TODO(fujino): https://github.com/flutter/flutter/issues/134566
|
||||
await Future<void>.delayed(const Duration(seconds: 2));
|
||||
|
||||
// Also send a kill signal in case the `q` above didn't work.
|
||||
process.kill(ProcessSignal.sigint);
|
||||
try {
|
||||
|
||||
@@ -15,7 +15,10 @@ import '../microbenchmarks.dart';
|
||||
|
||||
/// Creates a device lab task that runs benchmarks in
|
||||
/// `dev/benchmarks/microbenchmarks` reports results to the dashboard.
|
||||
TaskFunction createMicrobenchmarkTask({bool? enableImpeller}) {
|
||||
TaskFunction createMicrobenchmarkTask({
|
||||
bool? enableImpeller,
|
||||
Map<String, String> environment = const <String, String>{},
|
||||
}) {
|
||||
return () async {
|
||||
final Device device = await devices.workingDevice;
|
||||
await device.unlock();
|
||||
@@ -41,9 +44,9 @@ TaskFunction createMicrobenchmarkTask({bool? enableImpeller}) {
|
||||
return startFlutter(
|
||||
'run',
|
||||
options: options,
|
||||
environment: environment,
|
||||
);
|
||||
});
|
||||
|
||||
return readJsonResults(flutterProcess);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user