aboutsummaryrefslogtreecommitdiff
path: root/src/os/executable_test.go
diff options
context:
space:
mode:
authorClément Chigot <clement.chigot@atos.net>2018-10-25 10:02:37 +0200
committerBrad Fitzpatrick <bradfitz@golang.org>2018-10-26 14:46:35 +0000
commitdb9e15e68f24120922564365670c2bef6f6869e7 (patch)
treef0a7e1af713f8171297a5a09f0d696d58ab50161 /src/os/executable_test.go
parent43530e6b25ce542420967efa9d1016fad0336a4f (diff)
downloadgo-db9e15e68f24120922564365670c2bef6f6869e7.tar.xz
os: fix tests for AIX
This commits fixes tests for AIX inside os package. "hostname" command on AIX returns "name.domain" and not only "name". So, "hostname -s" must be called. Change-Id: I75e193bcb6ad607ce54ad99aabbed9839012f707 Reviewed-on: https://go-review.googlesource.com/c/144537 Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/os/executable_test.go')
-rw-r--r--src/os/executable_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/os/executable_test.go b/src/os/executable_test.go
index 4a9a8837be..d513c8760e 100644
--- a/src/os/executable_test.go
+++ b/src/os/executable_test.go
@@ -36,8 +36,8 @@ func TestExecutable(t *testing.T) {
// forge argv[0] for child, so that we can verify we could correctly
// get real path of the executable without influenced by argv[0].
cmd.Args = []string{"-", "-test.run=XXXX"}
- if runtime.GOOS == "openbsd" {
- // OpenBSD relies on argv[0]
+ if runtime.GOOS == "openbsd" || runtime.GOOS == "aix" {
+ // OpenBSD and AIX rely on argv[0]
cmd.Args[0] = fn
}
cmd.Env = append(os.Environ(), fmt.Sprintf("%s=1", executable_EnvVar))