1
0
mirror of https://github.com/golang/go synced 2024-11-26 22:11:25 -07:00

misc/cgo/testcshared: cd into work directory before running android command

Hopefully this will fix android build.

Maybe fixes #21513

Change-Id: I98f760562646f06b56e385c36927e79458465b92
Reviewed-on: https://go-review.googlesource.com/56790
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Alex Brainman 2017-08-18 16:34:44 +10:00
parent 3bece2fa0e
commit e2cdec77c6

View File

@ -151,7 +151,8 @@ func adbRun(t *testing.T, adbargs ...string) string {
t.Fatalf("trying to run adb command when operating system is not android.")
}
args := []string{"adb", "shell"}
args = append(args, adbargs...)
shellcmd := fmt.Sprintf("cd %s; %s", androiddir, strings.Join(adbargs, " "))
args = append(args, shellcmd)
cmd := exec.Command(args[0], args[1:]...)
out, err := cmd.CombinedOutput()
if err != nil {