From 30fc10d602b761f914972272a05b32473fd0e64a Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Thu, 22 Aug 2024 15:32:02 -0700 Subject: [PATCH] Update the web test suite runner to use the correct flutter_driver output path if FLUTTER_TEST_OUTPUTS_DIR is set (#153966) A pending change to the flutter_drone LUCI recipe is using a logging library that sets the FLUTTER_TEST_OUTPUTS_DIR environment variable (see https://flutter.googlesource.com/recipes/+/b111cd3ef2297e66905cc48c2cfedce0cf1ba46f) flutter_driver uses FLUTTER_TEST_OUTPUTS_DIR as its output directory if it is set. run_web_tests invokes flutter_driver and needs to look for outputs in that directory. --- dev/bots/suite_runners/run_web_tests.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dev/bots/suite_runners/run_web_tests.dart b/dev/bots/suite_runners/run_web_tests.dart index 4f52789efe..4064c8c27a 100644 --- a/dev/bots/suite_runners/run_web_tests.dart +++ b/dev/bots/suite_runners/run_web_tests.dart @@ -300,8 +300,10 @@ class WebTestsSuite { [ 'clean' ], workingDirectory: testAppDirectory, ); + // This must match the testOutputsDirectory defined in flutter_driver's driver/common.dart. + final String driverOutputPath = Platform.environment['FLUTTER_TEST_OUTPUTS_DIR'] ?? path.join(testAppDirectory, 'build'); final String responseFile = - path.join(testAppDirectory, 'build', 'integration_response_data.json'); + path.join(driverOutputPath, 'integration_response_data.json'); if (File(responseFile).existsSync()) { File(responseFile).deleteSync(); }