From 970c7652abbd010f226f407829008f2207169c16 Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Mon, 26 Feb 2024 16:39:21 -0800 Subject: [PATCH] Fix usage of --out-dir with a relative path. --- testing/scenario_app/bin/run_android_tests.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/testing/scenario_app/bin/run_android_tests.dart b/testing/scenario_app/bin/run_android_tests.dart index 6a6ed8e9bb659..3d43ffd12692f 100644 --- a/testing/scenario_app/bin/run_android_tests.dart +++ b/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.']); }