re PR go/48502 (os_test.TestStartProcess FAILs on Solaris 2)
authorIan Lance Taylor <ian@gcc.gnu.org>
Wed, 25 May 2011 05:57:54 +0000 (05:57 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Wed, 25 May 2011 05:57:54 +0000 (05:57 +0000)
PR go/48502
libgo/os: Fix test to run on Solaris.

Patch brought over from upstream library.

From-SVN: r174167

libgo/go/os/os_test.go

index 8b8a8434970cfd992eec2fc5e8baba3822c0f6fd..8df696261130a66f68e165077e5d32270eeb3348 100644 (file)
@@ -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)
        }