Unverified Commit 12880f77 authored by Jenn Magder's avatar Jenn Magder Committed by GitHub

Point gallery test data to FLUTTER_TEST_OUTPUTS_DIR (#79332)

parent 4d062996
...@@ -106,13 +106,14 @@ class GalleryTransitionTest { ...@@ -106,13 +106,14 @@ class GalleryTransitionTest {
]); ]);
}); });
final String testOutputDirectory = Platform.environment['FLUTTER_TEST_OUTPUTS_DIR'] ?? '${galleryDirectory.path}/build';
final Map<String, dynamic> summary = json.decode( final Map<String, dynamic> summary = json.decode(
file('${galleryDirectory.path}/build/$timelineSummaryFile.json').readAsStringSync(), file('$testOutputDirectory/$timelineSummaryFile.json').readAsStringSync(),
) as Map<String, dynamic>; ) as Map<String, dynamic>;
if (transitionDurationFile != null) { if (transitionDurationFile != null) {
final Map<String, dynamic> original = json.decode( final Map<String, dynamic> original = json.decode(
file('${galleryDirectory.path}/build/$transitionDurationFile.json').readAsStringSync(), file('$testOutputDirectory/$transitionDurationFile.json').readAsStringSync(),
) as Map<String, dynamic>; ) as Map<String, dynamic>;
final Map<String, List<int>> transitions = <String, List<int>>{}; final Map<String, List<int>> transitions = <String, List<int>>{};
for (final String key in original.keys) { for (final String key in original.keys) {
...@@ -125,9 +126,9 @@ class GalleryTransitionTest { ...@@ -125,9 +126,9 @@ class GalleryTransitionTest {
return TaskResult.success(summary, return TaskResult.success(summary,
detailFiles: <String>[ detailFiles: <String>[
if (transitionDurationFile != null) if (transitionDurationFile != null)
'${galleryDirectory.path}/build/$transitionDurationFile.json', '$testOutputDirectory/$transitionDurationFile.json',
if (timelineTraceFile != null) if (timelineTraceFile != null)
'${galleryDirectory.path}/build/$timelineTraceFile.json' '$testOutputDirectory/$timelineTraceFile.json'
], ],
benchmarkScoreKeys: <String>[ benchmarkScoreKeys: <String>[
if (transitionDurationFile != null) if (transitionDurationFile != null)
......
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