feat(testrun): add Preflight() before sidecar/driver setup

Mobile platforms get a friendly install hint pointing at
`sanderling doctor --platform=<p>` instead of `fork/exec java: not found`.
Web is a no-op.
This commit is contained in:
pj committed 2026-04-27 18:36:27 +07:00
1 parent 039c8ab226
commit f850e573f8
3 files changed
+146

No files matched your search

+3
View File
@@ -21,6 +21,9 @@ import (
// a cleanup function. For web, ChromeDriver is used directly; for android/ios
// the JVM sidecar is extracted, spawned, and dialed.
func buildDriver(ctx context.Context, options Options, stdout io.Writer) (driver.DeviceDriver, func(), error) {
if err := Preflight(ctx, options.Platform); err != nil {
return nil, nil, err
}
if options.Platform == "web" {
d := chrome.New()
return d, func() { _ = d.Terminate(context.Background()) }, nil