mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 10:25:37 +00:00
gogio: skip Android tests when no adb is found
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -29,6 +29,9 @@ func (d *AndroidTestDriver) Start(path string) {
|
|||||||
d.Skipf("Android SDK is required; set $ANDROID_SDK_ROOT")
|
d.Skipf("Android SDK is required; set $ANDROID_SDK_ROOT")
|
||||||
}
|
}
|
||||||
d.adbPath = filepath.Join(d.sdkDir, "platform-tools", "adb")
|
d.adbPath = filepath.Join(d.sdkDir, "platform-tools", "adb")
|
||||||
|
if _, err := os.Stat(d.adbPath); os.IsNotExist(err) {
|
||||||
|
d.Skipf("adb not found")
|
||||||
|
}
|
||||||
|
|
||||||
devOut := bytes.TrimSpace(d.adb("devices"))
|
devOut := bytes.TrimSpace(d.adb("devices"))
|
||||||
devices := rxAdbDevice.FindAllSubmatch(devOut, -1)
|
devices := rxAdbDevice.FindAllSubmatch(devOut, -1)
|
||||||
|
|||||||
Reference in New Issue
Block a user