Unverified Commit ab77e435 authored by keyonghan's avatar keyonghan Committed by GitHub

Migrate Linux android gallery `e2e` and `hybrid` tests to build+test (#110533)

parent 820a009f
...@@ -1940,25 +1940,29 @@ targets: ...@@ -1940,25 +1940,29 @@ targets:
tags: > tags: >
["devicelab", "android", "linux"] ["devicelab", "android", "linux"]
task_name: flutter_gallery__transition_perf task_name: flutter_gallery__transition_perf
artifact: gallery_app_profile artifact: gallery__transition_perf
- name: Linux_android flutter_gallery__transition_perf_e2e - name: Linux_build_test flutter_gallery__transition_perf_e2e
recipe: devicelab/devicelab_drone recipe: devicelab/devicelab_drone_build_test
bringup: true # New target https://github.com/flutter/flutter/issues/103542
presubmit: false presubmit: false
timeout: 60 timeout: 60
properties: properties:
tags: > tags: >
["devicelab", "android", "linux"] ["devicelab", "android", "linux"]
task_name: flutter_gallery__transition_perf_e2e task_name: flutter_gallery__transition_perf_e2e
artifact: gallery__transition_perf_e2e
- name: Linux_android flutter_gallery__transition_perf_hybrid - name: Linux_build_test flutter_gallery__transition_perf_hybrid
recipe: devicelab/devicelab_drone recipe: devicelab/devicelab_drone_build_test
bringup: true # New target https://github.com/flutter/flutter/issues/103542
presubmit: false presubmit: false
timeout: 60 timeout: 60
properties: properties:
tags: > tags: >
["devicelab", "android", "linux"] ["devicelab", "android", "linux"]
task_name: flutter_gallery__transition_perf_hybrid task_name: flutter_gallery__transition_perf_hybrid
artifact: gallery__transition_perf_hybrid
- name: Linux_android flutter_gallery__transition_perf_with_semantics - name: Linux_android flutter_gallery__transition_perf_with_semantics
recipe: devicelab/devicelab_drone recipe: devicelab/devicelab_drone
......
...@@ -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.android; deviceOperatingSystem = DeviceOperatingSystem.android;
await task(createGalleryTransitionE2ETest()); await task(createGalleryTransitionE2EBuildTest(args));
} }
...@@ -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.android; deviceOperatingSystem = DeviceOperatingSystem.android;
await task(createGalleryTransitionHybridTest()); await task(createGalleryTransitionHybridBuildTest(args));
} }
...@@ -25,6 +25,23 @@ TaskFunction createGalleryTransitionTest({bool semanticsEnabled = false}) { ...@@ -25,6 +25,23 @@ TaskFunction createGalleryTransitionTest({bool semanticsEnabled = false}) {
return GalleryTransitionTest(semanticsEnabled: semanticsEnabled); return GalleryTransitionTest(semanticsEnabled: semanticsEnabled);
} }
TaskFunction createGalleryTransitionE2EBuildTest(
List<String> args, {
bool semanticsEnabled = false,
bool enableImpeller = false,
}) {
return GalleryTransitionBuildTest(
args,
testFile: semanticsEnabled ? 'transitions_perf_e2e_with_semantics' : 'transitions_perf_e2e',
needFullTimeline: false,
timelineSummaryFile: 'e2e_perf_summary',
transitionDurationFile: null,
timelineTraceFile: null,
driverFile: 'transitions_perf_e2e_test',
enableImpeller: enableImpeller,
);
}
TaskFunction createGalleryTransitionE2ETest({ TaskFunction createGalleryTransitionE2ETest({
bool semanticsEnabled = false, bool semanticsEnabled = false,
bool enableImpeller = false, bool enableImpeller = false,
...@@ -42,6 +59,17 @@ TaskFunction createGalleryTransitionE2ETest({ ...@@ -42,6 +59,17 @@ TaskFunction createGalleryTransitionE2ETest({
); );
} }
TaskFunction createGalleryTransitionHybridBuildTest(
List<String> args, {
bool semanticsEnabled = false,
}) {
return GalleryTransitionBuildTest(
args,
semanticsEnabled: semanticsEnabled,
driverFile: semanticsEnabled ? 'transitions_perf_hybrid_with_semantics_test' : 'transitions_perf_hybrid_test',
);
}
TaskFunction createGalleryTransitionHybridTest({bool semanticsEnabled = false}) { TaskFunction createGalleryTransitionHybridTest({bool semanticsEnabled = false}) {
return GalleryTransitionTest( return GalleryTransitionTest(
semanticsEnabled: semanticsEnabled, semanticsEnabled: semanticsEnabled,
...@@ -205,12 +233,14 @@ class GalleryTransitionBuildTest extends BuildTestTask { ...@@ -205,12 +233,14 @@ class GalleryTransitionBuildTest extends BuildTestTask {
this.driverFile, this.driverFile,
this.measureCpuGpu = true, this.measureCpuGpu = true,
this.measureMemory = true, this.measureMemory = true,
this.enableImpeller = false,
}) : super(workingDirectory: galleryDirectory); }) : super(workingDirectory: galleryDirectory);
final bool semanticsEnabled; final bool semanticsEnabled;
final bool needFullTimeline; final bool needFullTimeline;
final bool measureCpuGpu; final bool measureCpuGpu;
final bool measureMemory; final bool measureMemory;
final bool enableImpeller;
final String testFile; final String testFile;
final String timelineSummaryFile; final String timelineSummaryFile;
final String? timelineTraceFile; final String? timelineTraceFile;
...@@ -246,7 +276,9 @@ class GalleryTransitionBuildTest extends BuildTestTask { ...@@ -246,7 +276,9 @@ class GalleryTransitionBuildTest extends BuildTestTask {
List<String> getTestArgs(DeviceOperatingSystem deviceOperatingSystem, String deviceId) { List<String> getTestArgs(DeviceOperatingSystem deviceOperatingSystem, String deviceId) {
final String testDriver = driverFile ?? (semanticsEnabled ? '${testFile}_with_semantics_test' : '${testFile}_test'); final String testDriver = driverFile ?? (semanticsEnabled ? '${testFile}_with_semantics_test' : '${testFile}_test');
return <String>[ return <String>[
'--no-dds',
'--profile', '--profile',
if (enableImpeller) '--enable-impeller',
if (needFullTimeline) '--trace-startup', if (needFullTimeline) '--trace-startup',
'-t', '-t',
'test_driver/$testFile.dart', 'test_driver/$testFile.dart',
......
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