mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-13 17:29:56 +08:00
change: filter non-usb ios devices
This commit is contained in:
@@ -85,11 +85,13 @@ var listDevicesCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
for _, d := range devices {
|
||||
deviceByte, _ := json.Marshal(d.Properties())
|
||||
deviceProperties := d.Properties()
|
||||
device := &Device{
|
||||
d: d,
|
||||
d: d,
|
||||
UDID: deviceProperties.SerialNumber,
|
||||
ConnectionType: deviceProperties.ConnectionType,
|
||||
ConnectionSpeed: deviceProperties.ConnectionSpeed,
|
||||
}
|
||||
json.Unmarshal(deviceByte, device)
|
||||
device.Status = device.GetStatus()
|
||||
|
||||
if isDetail {
|
||||
|
||||
@@ -124,6 +124,10 @@ func IOSDevices(udid ...string) (devices []gidevice.Device, err error) {
|
||||
if u != "" && u != d.Properties().SerialNumber {
|
||||
continue
|
||||
}
|
||||
// filter non-usb ios devices
|
||||
if d.Properties().ConnectionType != "USB" {
|
||||
continue
|
||||
}
|
||||
deviceList = append(deviceList, d)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user