From 354d116cd6fea033cdce99532fd10a3c75f2e18a Mon Sep 17 00:00:00 2001 From: godofredoc <54371434+godofredoc@users.noreply.github.com> Date: Wed, 15 Jul 2020 20:13:38 -0700 Subject: [PATCH] Re-enable logging. (flutter/engine#19756) * Re-enable logging. fuchsia_ctl was updated to support processing the logs as a stream instead of keeping them in the process. Bug: flutter/flutter#57273 * Add path to logs file. * Add the isolated output env directly to the script. * Save log to local directory and printing it using cat. * Try collecting and printing logs as separate steps. --- .../src/flutter/testing/fuchsia/run_tests.sh | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/engine/src/flutter/testing/fuchsia/run_tests.sh b/engine/src/flutter/testing/fuchsia/run_tests.sh index 1c8a5d07635..72d9c8bc929 100755 --- a/engine/src/flutter/testing/fuchsia/run_tests.sh +++ b/engine/src/flutter/testing/fuchsia/run_tests.sh @@ -37,14 +37,18 @@ else fi reboot() { - # TODO come up with better log collection strategy. - # https://github.com/flutter/flutter/issues/57273 - # echo "Dumping system logs..." - - # ./fuchsia_ctl -d $device_name ssh \ - # -c "log_listener --dump_logs yes" \ - # --timeout-seconds $ssh_timeout_seconds \ - # --identity-file $pkey + ./fuchsia_ctl -d $device_name ssh \ + -c "log_listener --dump_logs yes --file /tmp/log.txt" \ + --timeout-seconds $ssh_timeout_seconds \ + --identity-file $pkey + # As we are not using recipes we don't have a way to know the location + # to upload the log to isolated. We are saving the log to a file to avoid dart + # hanging when running the process and then just using printing the content to + # the console. + ./fuchsia_ctl -d $device_name ssh \ + -c "cat /tmp/log.txt" \ + --timeout-seconds $ssh_timeout_seconds \ + --identity-file $pkey echo "$(date) START:REBOOT ------------------------------------------" # note: this will set an exit code of 255, which we can ignore.