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
This commit is contained in:
Ian Lance Taylor 2011-05-25 05:57:54 +00:00
parent 30a435d83a
commit 349ea8e855
1 changed files with 2 additions and 1 deletions

View 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)
}