]> Cypherpunks repositories - gostls13.git/commitdiff
misc/cgo/testcshared: cd into work directory before running android command
authorAlex Brainman <alex.brainman@gmail.com>
Fri, 18 Aug 2017 06:34:44 +0000 (16:34 +1000)
committerAlex Brainman <alex.brainman@gmail.com>
Sat, 19 Aug 2017 02:27:34 +0000 (02:27 +0000)
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>

misc/cgo/testcshared/cshared_test.go

index 47dd0c69afa3c5832b8765309f3780bbc4b202c9..57649a0bfb13d4fd020ff8b234913199851c8e67 100644 (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 {