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:
device_type: none
cpu: x86
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:
properties:
dependencies: >-
......@@ -3929,6 +3938,18 @@ targets:
["devicelab", "ios", "mac"]
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
recipe: devicelab/devicelab_drone
presubmit: false
......
......@@ -6,7 +6,7 @@ import 'package:flutter_devicelab/framework/devices.dart';
import 'package:flutter_devicelab/framework/framework.dart';
import 'package:flutter_devicelab/tasks/gallery.dart';
Future<void> main() async {
Future<void> main(List<String> args) async {
deviceOperatingSystem = DeviceOperatingSystem.ios;
await task(createGalleryTransitionE2ETest());
await task(createGalleryTransitionE2EBuildTest(args));
}
......@@ -254,25 +254,44 @@ class GalleryTransitionBuildTest extends BuildTestTask {
@override
void copyArtifacts() {
if(applicationBinaryPath != null) {
if (applicationBinaryPath == null) {
return;
}
if (deviceOperatingSystem == DeviceOperatingSystem.android) {
copy(
file('${galleryDirectory.path}/build/app/outputs/flutter-apk/app-profile.apk'),
Directory(applicationBinaryPath!),
);
} else if (deviceOperatingSystem == DeviceOperatingSystem.ios) {
recursiveCopy(
Directory('${galleryDirectory.path}/build/ios/iphoneos'),
Directory(applicationBinaryPath!),
);
}
}
@override
List<String> getBuildArgs(DeviceOperatingSystem deviceOperatingSystem) {
return <String>[
'apk',
'--no-android-gradle-daemon',
'--profile',
'-t',
'test_driver/$testFile.dart',
'--target-platform',
'android-arm,android-arm64',
];
if (deviceOperatingSystem == DeviceOperatingSystem.android) {
return <String>[
'apk',
'--no-android-gradle-daemon',
'--profile',
'-t',
'test_driver/$testFile.dart',
'--target-platform',
'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
......@@ -286,7 +305,7 @@ class GalleryTransitionBuildTest extends BuildTestTask {
if (needFullTimeline) '--trace-startup',
'-t',
'test_driver/$testFile.dart',
'--use-application-binary=${getApplicationBinaryPath()}',
if (applicationBinaryPath != null) '--use-application-binary=${getApplicationBinaryPath()}',
'--driver',
'test_driver/$testDriver.dart',
'-d',
......@@ -362,11 +381,13 @@ class GalleryTransitionBuildTest extends BuildTestTask {
@override
String getApplicationBinaryPath() {
if (applicationBinaryPath != null) {
return '${applicationBinaryPath!}/app-profile.apk';
if (deviceOperatingSystem == DeviceOperatingSystem.android) {
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