bug fix for flutter_gallery__transition_perf(_with_semantics) (#63799)

* report failure for semantics test

* bug fix
This commit is contained in:
Ming Lyu (CareF)
2020-08-14 19:37:08 -04:00
committed by GitHub
parent ede1b15b76
commit 6f26e806ab
2 changed files with 14 additions and 2 deletions

View File

@@ -13,6 +13,18 @@ Future<void> main() async {
await task(() async {
final TaskResult withoutSemantics = await createGalleryTransitionTest()();
final TaskResult withSemantics = await createGalleryTransitionTest(semanticsEnabled: true)();
if (withSemantics.benchmarkScoreKeys.isEmpty || withoutSemantics.benchmarkScoreKeys.isEmpty) {
String message = 'Lack of data';
if (withSemantics.benchmarkScoreKeys.isEmpty) {
message += ' for test with semantics';
if (withoutSemantics.benchmarkScoreKeys.isEmpty) {
message += ' and without semantics';
}
} else {
message += 'for test without semantics';
}
return TaskResult.failure(message);
}
final List<String> benchmarkScoreKeys = <String>[];
final Map<String, dynamic> data = <String, dynamic>{};

View File

@@ -64,8 +64,8 @@ class GalleryTransitionTest {
await flutter('packages', options: <String>['get']);
final String testDriver = driverFile ?? (semanticsEnabled
? '${testFile}_test'
: '${testFile}_with_semantics_test');
? '${testFile}_with_semantics_test'
: '${testFile}_test');
await flutter('drive', options: <String>[
'--profile',