aboutsummaryrefslogtreecommitdiff
path: root/misc/cgo/testcshared
diff options
context:
space:
mode:
authorAlex Brainman <alex.brainman@gmail.com>2017-08-18 16:34:44 +1000
committerAlex Brainman <alex.brainman@gmail.com>2017-08-19 02:27:34 +0000
commite2cdec77c6aed0838631289bce5c17bbfe7c4dfc (patch)
treef0e382eb9590eb56f091af458cfff961a9caaf15 /misc/cgo/testcshared
parent3bece2fa0e10c2dec37b3f57925def40c8191e37 (diff)
downloadgo-e2cdec77c6aed0838631289bce5c17bbfe7c4dfc.tar.xz
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>
Diffstat (limited to 'misc/cgo/testcshared')
-rw-r--r--misc/cgo/testcshared/cshared_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/misc/cgo/testcshared/cshared_test.go b/misc/cgo/testcshared/cshared_test.go
index 47dd0c69af..57649a0bfb 100644
--- a/misc/cgo/testcshared/cshared_test.go
+++ b/misc/cgo/testcshared/cshared_test.go
@@ -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 {