Skip to content

Commit e2cdec7

Browse files
committed
misc/cgo/testcshared: cd into work directory before running android command
Hopefully this will fix android build. Maybe fixes golang#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>
1 parent 3bece2f commit e2cdec7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

misc/cgo/testcshared/cshared_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,8 @@ func adbRun(t *testing.T, adbargs ...string) string {
151151
t.Fatalf("trying to run adb command when operating system is not android.")
152152
}
153153
args := []string{"adb", "shell"}
154-
args = append(args, adbargs...)
154+
shellcmd := fmt.Sprintf("cd %s; %s", androiddir, strings.Join(adbargs, " "))
155+
args = append(args, shellcmd)
155156
cmd := exec.Command(args[0], args[1:]...)
156157
out, err := cmd.CombinedOutput()
157158
if err != nil {

0 commit comments

Comments
 (0)