[catalyst] Give device time to reboot
Sherlocks seem to take longer to reboot than expected, so add a
delay to do so.
Change-Id: I150d55e288309dbd8e7db87453948d3205d628d1
diff --git a/cmd/catalyst/main.go b/cmd/catalyst/main.go
index bc2857d..7dbb9c3 100644
--- a/cmd/catalyst/main.go
+++ b/cmd/catalyst/main.go
@@ -17,6 +17,7 @@
"strconv"
"strings"
"syscall"
+ "time"
devicePkg "go.fuchsia.dev/infra/devices"
)
@@ -26,6 +27,7 @@
portEnvVar = "NUC_SERVER_PORT"
// chainloaderExitStr instructs a NUC to exit IPXE and boot from disk
chainloaderExitStr = "#!ipxe\necho Catalyst chain loader\nexit 0\n"
+ rebootDuration = 1 * time.Minute
)
var (
@@ -174,6 +176,7 @@
return exitCode, nil
}
+ time.Sleep(rebootDuration)
// Execute the passed in subcommand
return runSubprocess(ctx, subcommandArgs), nil
}