Skip to content

Commit 7450cf5

Browse files
godofredocgspencergoog
authored andcommitted
Collect logs in the background. (flutter#21828)
* Collect logs in the background. * Use fuchsia_ctl log_file option. * Delete the correct file. * Remove commented code.
1 parent 1952a72 commit 7450cf5

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

testing/fuchsia/run_tests.sh

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,12 @@ fuchsia_ctl() {
4545
}
4646

4747
reboot() {
48-
fuchsia_ctl ssh \
49-
--timeout-seconds $ssh_timeout_seconds \
50-
--identity-file $pkey \
51-
-c "log_listener --dump_logs yes --file /tmp/log.txt"
5248
# As we are not using recipes we don't have a way to know the location
5349
# to upload the log to isolated. We are saving the log to a file to avoid dart
5450
# hanging when running the process and then just using printing the content to
5551
# the console.
56-
fuchsia_ctl ssh \
57-
--timeout-seconds $ssh_timeout_seconds \
58-
--identity-file $pkey \
59-
-c "cat /tmp/log.txt"
60-
61-
52+
kill -9 $PID
53+
cat /tmp/log.txt
6254
echo "$(date) START:REBOOT ----------------------------------------"
6355
# note: this will set an exit code of 255, which we can ignore.
6456
fuchsia_ctl ssh \
@@ -82,6 +74,9 @@ for i in {1..10}; do
8274
--identity-file $pkey \
8375
-c "echo up" && break || sleep 15;
8476
done
77+
rm -rf /tmp/log.txt
78+
fuchsia_ctl ssh --timeout-seconds 1800 --identity-file $pkey -c "log_listener" --log-file /tmp/log.txt &
79+
PID=$!
8580
echo "$(date) END:WAIT_DEVICE_READY ---------------------------------"
8681

8782
echo "$(date) START:EXTRACT_PACKAGES -------------------------------"

0 commit comments

Comments
 (0)