Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(428)

Unified Diff: ct/go/adb/adb.go

Issue 1302513006: Reland of Add a library for running external commands, providing timeouts and test injection. (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Fix bug with nil io.Writer. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ct/go/util/util.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ct/go/adb/adb.go
diff --git a/ct/go/adb/adb.go b/ct/go/adb/adb.go
index 00a8b0b848cd21cdd9ba0cf0338e73ad7d72727b..0f97dc7bf09bc5e500c7945bfc7d94ae04634ef4 100644
--- a/ct/go/adb/adb.go
+++ b/ct/go/adb/adb.go
@@ -6,9 +6,8 @@ import (
"os/exec"
"time"
- "github.com/skia-dev/glog"
-
"go.skia.org/infra/ct/go/util"
+ skexec "go.skia.org/infra/go/exec"
skutil "go.skia.org/infra/go/util"
)
@@ -27,7 +26,7 @@ func VerifyLocalDevice() error {
devicesCmd := exec.Command(util.BINARY_ADB, "devices")
offlineCmd := exec.Command("grep", "offline")
offlineCmd.Stdin, _ = devicesCmd.StdoutPipe()
- offlineCmd.Stdout = util.WriteLog{LogFunc: glog.Infof, OutputFile: nil}
+ offlineCmd.Stdout = skexec.WriteInfoLog
skutil.LogErr(offlineCmd.Start())
skutil.LogErr(devicesCmd.Run())
if err := offlineCmd.Wait(); err == nil {
@@ -40,7 +39,7 @@ func VerifyLocalDevice() error {
devicesCmd = exec.Command(util.BINARY_ADB, "devices")
missingCmd := exec.Command("grep", "device$")
missingCmd.Stdin, _ = devicesCmd.StdoutPipe()
- missingCmd.Stdout = util.WriteLog{LogFunc: glog.Infof, OutputFile: nil}
+ missingCmd.Stdout = skexec.WriteInfoLog
skutil.LogErr(missingCmd.Start())
skutil.LogErr(devicesCmd.Run())
if err := missingCmd.Wait(); err != nil {
« no previous file with comments | « no previous file | ct/go/util/util.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698