Skip to content

Commit aa519b4

Browse files
committed
Don't show monitor errors for a missing assemble_cvd.log
This file is expected to be missing until the device starts launching. Bug: b/533115150
1 parent 8be30ca commit aa519b4

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

base/cvd/cuttlefish/host/commands/cvd/cli/commands/monitor/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ cf_cc_library(
152152
"//cuttlefish/host/commands/cvd/cli:utils",
153153
"//cuttlefish/host/commands/cvd/instances",
154154
"//cuttlefish/host/libs/log_names",
155+
"//cuttlefish/io:in_memory",
155156
"//cuttlefish/io:shared_fd",
156157
"//cuttlefish/result",
157158
"@abseil-cpp//absl/strings",

base/cvd/cuttlefish/host/commands/cvd/cli/commands/monitor/monitor.cc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
#include "cuttlefish/host/commands/cvd/cli/utils.h"
4242
#include "cuttlefish/host/commands/cvd/instances/local_instance.h"
4343
#include "cuttlefish/host/libs/log_names/log_names.h"
44+
#include "cuttlefish/io/in_memory.h"
4445
#include "cuttlefish/io/shared_fd.h"
4546
#include "cuttlefish/result/result.h"
4647

@@ -165,7 +166,12 @@ Result<void> MonitorLogs(const LocalInstance& instance, SharedFD stop_eventfd) {
165166
kernel_lines = total_content / 3;
166167
logcat_lines = total_content - launcher_lines - kernel_lines;
167168
}
168-
display.DrawFile(SharedFdIo(launcher_fd), launcher_name, launcher_lines);
169+
if (!FileExists(assemble_log)) {
170+
display.DrawFile(*InMemoryIo("Waiting for assemble_cvd.log creation"),
171+
launcher_name, launcher_lines);
172+
} else {
173+
display.DrawFile(SharedFdIo(launcher_fd), launcher_name, launcher_lines);
174+
}
169175
display.DrawFile(SharedFdIo(kernel_fd), kLogNameKernel, kernel_lines);
170176
display.DrawFile(SharedFdIo(logcat_fd), kLogNameLogcat, logcat_lines);
171177

0 commit comments

Comments
 (0)