Unverified Commit 8ab782d0 authored by keyonghan's avatar keyonghan Committed by GitHub

Migrate gallery ios tests to build+test (#111164)

Part of https://github.com/flutter/flutter/issues/103542
parent b269eb52
...@@ -111,6 +111,15 @@ platform_properties: ...@@ -111,6 +111,15 @@ platform_properties:
device_type: none device_type: none
cpu: x86 cpu: x86
xcode: 14e222b xcode: 14e222b
mac_build_test:
properties:
dependencies: >-
[
{"dependency": "apple_signing", "version": "version:2022_to_2023"}
]
os: Mac-12
device_type: none
xcode: 14e222b
mac_android: mac_android:
properties: properties:
dependencies: >- dependencies: >-
...@@ -3929,6 +3938,18 @@ targets: ...@@ -3929,6 +3938,18 @@ targets:
["devicelab", "ios", "mac"] ["devicelab", "ios", "mac"]
task_name: flutter_gallery__transition_perf_e2e_ios task_name: flutter_gallery__transition_perf_e2e_ios
- name: Mac_build_test flutter_gallery__transition_perf_e2e_ios
recipe: devicelab/devicelab_drone_build_test
bringup: true # New target: https://github.com/flutter/flutter/pull/111164
presubmit: false
timeout: 60
properties:
tags: >
["devicelab", "ios", "mac"]
task_name: flutter_gallery__transition_perf_e2e_ios
drone_dimensions: >
["device_os=iOS-16","os=Mac-12", "cpu=x86"]
- name: Mac_ios animated_blur_backdrop_filter_perf_ios__timeline_summary - name: Mac_ios animated_blur_backdrop_filter_perf_ios__timeline_summary
recipe: devicelab/devicelab_drone recipe: devicelab/devicelab_drone
presubmit: false presubmit: false
......
...@@ -6,7 +6,7 @@ import 'package:flutter_devicelab/framework/devices.dart'; ...@@ -6,7 +6,7 @@ import 'package:flutter_devicelab/framework/devices.dart';
import 'package:flutter_devicelab/framework/framework.dart'; import 'package:flutter_devicelab/framework/framework.dart';
import 'package:flutter_devicelab/tasks/gallery.dart'; import 'package:flutter_devicelab/tasks/gallery.dart';
Future<void> main() async { Future<void> main(List<String> args) async {
deviceOperatingSystem = DeviceOperatingSystem.ios; deviceOperatingSystem = DeviceOperatingSystem.ios;
await task(createGalleryTransitionE2ETest()); await task(createGalleryTransitionE2EBuildTest(args));
} }
...@@ -254,16 +254,25 @@ class GalleryTransitionBuildTest extends BuildTestTask { ...@@ -254,16 +254,25 @@ class GalleryTransitionBuildTest extends BuildTestTask {
@override @override
void copyArtifacts() { void copyArtifacts() {
if(applicationBinaryPath != null) { if (applicationBinaryPath == null) {
return;
}
if (deviceOperatingSystem == DeviceOperatingSystem.android) {
copy( copy(
file('${galleryDirectory.path}/build/app/outputs/flutter-apk/app-profile.apk'), file('${galleryDirectory.path}/build/app/outputs/flutter-apk/app-profile.apk'),
Directory(applicationBinaryPath!), Directory(applicationBinaryPath!),
); );
} else if (deviceOperatingSystem == DeviceOperatingSystem.ios) {
recursiveCopy(
Directory('${galleryDirectory.path}/build/ios/iphoneos'),
Directory(applicationBinaryPath!),
);
} }
} }
@override @override
List<String> getBuildArgs(DeviceOperatingSystem deviceOperatingSystem) { List<String> getBuildArgs(DeviceOperatingSystem deviceOperatingSystem) {
if (deviceOperatingSystem == DeviceOperatingSystem.android) {
return <String>[ return <String>[
'apk', 'apk',
'--no-android-gradle-daemon', '--no-android-gradle-daemon',
...@@ -273,6 +282,16 @@ class GalleryTransitionBuildTest extends BuildTestTask { ...@@ -273,6 +282,16 @@ class GalleryTransitionBuildTest extends BuildTestTask {
'--target-platform', '--target-platform',
'android-arm,android-arm64', 'android-arm,android-arm64',
]; ];
} else if (deviceOperatingSystem == DeviceOperatingSystem.ios) {
return <String>[
'ios',
'--codesign',
'--profile',
'-t',
'test_driver/$testFile.dart',
];
}
throw Exception('$deviceOperatingSystem has no build configuration');
} }
@override @override
...@@ -286,7 +305,7 @@ class GalleryTransitionBuildTest extends BuildTestTask { ...@@ -286,7 +305,7 @@ class GalleryTransitionBuildTest extends BuildTestTask {
if (needFullTimeline) '--trace-startup', if (needFullTimeline) '--trace-startup',
'-t', '-t',
'test_driver/$testFile.dart', 'test_driver/$testFile.dart',
'--use-application-binary=${getApplicationBinaryPath()}', if (applicationBinaryPath != null) '--use-application-binary=${getApplicationBinaryPath()}',
'--driver', '--driver',
'test_driver/$testDriver.dart', 'test_driver/$testDriver.dart',
'-d', '-d',
...@@ -362,11 +381,13 @@ class GalleryTransitionBuildTest extends BuildTestTask { ...@@ -362,11 +381,13 @@ class GalleryTransitionBuildTest extends BuildTestTask {
@override @override
String getApplicationBinaryPath() { String getApplicationBinaryPath() {
if (applicationBinaryPath != null) { if (deviceOperatingSystem == DeviceOperatingSystem.android) {
return '${applicationBinaryPath!}/app-profile.apk'; return '$applicationBinaryPath/app-profile.apk';
} else if (deviceOperatingSystem == DeviceOperatingSystem.ios) {
return '$applicationBinaryPath/Flutter Gallery.app';
} else {
return applicationBinaryPath!;
} }
return 'build/app/outputs/flutter-apk/app-profile.apk';
} }
} }
......
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