Clean up flutter_gallery__transition_perf (#63609)
This commit is contained in:
@@ -11,14 +11,15 @@ import '../framework/adb.dart';
|
||||
import '../framework/framework.dart';
|
||||
import '../framework/utils.dart';
|
||||
|
||||
TaskFunction createGalleryTransitionTest({ bool semanticsEnabled = false }) {
|
||||
TaskFunction createGalleryTransitionTest({bool semanticsEnabled = false}) {
|
||||
return GalleryTransitionTest(semanticsEnabled: semanticsEnabled);
|
||||
}
|
||||
|
||||
TaskFunction createGalleryTransitionE2ETest({ bool semanticsEnabled = false }) {
|
||||
TaskFunction createGalleryTransitionE2ETest({bool semanticsEnabled = false}) {
|
||||
return GalleryTransitionTest(
|
||||
semanticsEnabled: semanticsEnabled,
|
||||
testFile: 'transitions_perf_e2e',
|
||||
testFile: semanticsEnabled
|
||||
? 'transitions_perf_e2e_with_semantics'
|
||||
: 'transitions_perf_e2e',
|
||||
needFullTimeline: false,
|
||||
timelineSummaryFile: 'e2e_perf_summary',
|
||||
transitionDurationFile: null,
|
||||
@@ -26,6 +27,15 @@ TaskFunction createGalleryTransitionE2ETest({ bool semanticsEnabled = false }) {
|
||||
);
|
||||
}
|
||||
|
||||
TaskFunction createGalleryTransitionHybridTest({bool semanticsEnabled = false}) {
|
||||
return GalleryTransitionTest(
|
||||
semanticsEnabled: semanticsEnabled,
|
||||
driverFile: semanticsEnabled
|
||||
? 'transitions_perf_hybrid_with_semantics_test'
|
||||
: 'transitions_perf_hybrid_test',
|
||||
);
|
||||
}
|
||||
|
||||
class GalleryTransitionTest {
|
||||
|
||||
GalleryTransitionTest({
|
||||
@@ -53,18 +63,18 @@ class GalleryTransitionTest {
|
||||
await inDirectory<void>(galleryDirectory, () async {
|
||||
await flutter('packages', options: <String>['get']);
|
||||
|
||||
final String testDriver = semanticsEnabled
|
||||
? '${testFile}_with_semantics.dart'
|
||||
: '$testFile.dart';
|
||||
final String testDriver = driverFile ?? (semanticsEnabled
|
||||
? '${testFile}_test'
|
||||
: '${testFile}_with_semantics_test');
|
||||
|
||||
await flutter('drive', options: <String>[
|
||||
'--profile',
|
||||
if (needFullTimeline)
|
||||
'--trace-startup',
|
||||
'-t',
|
||||
'test_driver/$testDriver',
|
||||
if (driverFile != null)
|
||||
...<String>['--driver', 'test_driver/$driverFile.dart'],
|
||||
'test_driver/$testFile.dart',
|
||||
'--driver',
|
||||
'test_driver/$testDriver.dart',
|
||||
'-d',
|
||||
deviceId,
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user