From: Ian Lance Taylor Date: Wed, 25 May 2011 05:57:54 +0000 (+0000) Subject: re PR go/48502 (os_test.TestStartProcess FAILs on Solaris 2) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=349ea8e8550b73e69673f629df24d79902b4d371;p=gcc.git re PR go/48502 (os_test.TestStartProcess FAILs on Solaris 2) PR go/48502 libgo/os: Fix test to run on Solaris. Patch brought over from upstream library. From-SVN: r174167 --- diff --git a/libgo/go/os/os_test.go b/libgo/go/os/os_test.go index 8b8a8434970..8df69626113 100644 --- a/libgo/go/os/os_test.go +++ b/libgo/go/os/os_test.go @@ -437,7 +437,8 @@ func exec(t *testing.T, dir, cmd string, args []string, expect string) { var b bytes.Buffer io.Copy(&b, r) output := b.String() - if output != expect { + // Accept /usr prefix because Solaris /bin is symlinked to /usr/bin. + if output != expect && output != "/usr"+expect { t.Errorf("exec %q returned %q wanted %q", strings.Join(append([]string{cmd}, args...), " "), output, expect) }