func LogTestSuite(device *rats.Device, manifest *apk.Manifest, out chan *RunPair) { testRunner := fmt.Sprintf("%s/%s", manifest.Package, manifest.Instrument.Name) in := adb.Shell(device, "am", "instrument", "-r", "-e", "log", "true", "-w", testRunner) suite := TestSuite{Device: device, Hostname: device.Serial, Name: device.String()} parseInstrumentation(&suite, in) out <- &RunPair{Tests: &suite, Device: device} }
func (p *PidCat) UpdateAppFilters(t adb.Transporter) error { if p.AppFilters == nil { return nil } ps := adb.Shell(t, "ps") for line := range ps { groups := PID_PARSER.FindSubmatch(line) app := string(groups[2]) _, present := p.AppFilters[app] if present { p.pidFilters[string(groups[1])] = true } } return nil }