From adc86fe60bdd544a613667b9c99d6ae3ef2b6791 Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Mon, 26 Feb 2024 18:35:28 -0800 Subject: [PATCH] Fix usage of `--out-dir` with a relative path. (flutter/engine#50992) @dnfield: > it looks like the new dart script doesn't necessarily work well with relative directories for the out dir --- .../flutter/testing/scenario_app/bin/run_android_tests.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/engine/src/flutter/testing/scenario_app/bin/run_android_tests.dart b/engine/src/flutter/testing/scenario_app/bin/run_android_tests.dart index 6a6ed8e9bb..3d43ffd126 100644 --- a/engine/src/flutter/testing/scenario_app/bin/run_android_tests.dart +++ b/engine/src/flutter/testing/scenario_app/bin/run_android_tests.dart @@ -401,8 +401,9 @@ Future _run({ // TODO(matanlurey): Resolve this in a better way. On CI this file always exists. File(join(screenshotPath, 'noop.txt')).writeAsStringSync(''); // TODO(gaaclarke): We should move this into dir_contents_diff. - _withTemporaryCwd(dirname(contentsGolden), () { - final int exitCode = dirContentsDiff(basename(contentsGolden), screenshotPath); + final String diffScreenhotPath = absolute(screenshotPath); + _withTemporaryCwd(absolute(dirname(contentsGolden)), () { + final int exitCode = dirContentsDiff(basename(contentsGolden), diffScreenhotPath); if (exitCode != 0) { panic(['Output contents incorrect.']); }