From 97996b07a2e1034be98d66caeef77ef9fcdaf8ea Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Fri, 2 Aug 2024 16:21:18 -0700 Subject: [PATCH] Use print logging on LUCI. (#152776) Work around https://github.com/flutter/flutter/issues/152775 diagnosing https://github.com/flutter/flutter/issues/152769. --- .../android_driver_test/test_driver/main_test.dart | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/dev/integration_tests/android_driver_test/test_driver/main_test.dart b/dev/integration_tests/android_driver_test/test_driver/main_test.dart index 49e681368eb..d982d7bbeae 100644 --- a/dev/integration_tests/android_driver_test/test_driver/main_test.dart +++ b/dev/integration_tests/android_driver_test/test_driver/main_test.dart @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +import 'dart:io' as io; + import 'package:flutter_driver/flutter_driver.dart'; import 'package:flutter_driver/src/native_driver.dart'; import 'package:test/test.dart'; @@ -16,6 +18,8 @@ void main() async { await testExecutable(_main); } +final bool _isLuciCi = io.Platform.environment['LUCI_CI'] == 'True'; + Future _main() async { // To generate golden files locally, uncomment the following line. // autoUpdateGoldenFiles = true; @@ -24,7 +28,12 @@ Future _main() async { late NativeDriver nativeDriver; setUpAll(() async { - flutterDriver = await FlutterDriver.connect(); + flutterDriver = await FlutterDriver.connect( + // TODO(matanlurey): Workaround log uploading in LUCI not being enabled. + // Default to true on CI because log uploading doesn't work. + // See . + printCommunication: _isLuciCi, + ); nativeDriver = await AndroidNativeDriver.connect(); });