Commit 349ea8e8 by Ian Lance Taylor

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
parent 30a435d8
...@@ -437,7 +437,8 @@ func exec(t *testing.T, dir, cmd string, args []string, expect string) { ...@@ -437,7 +437,8 @@ func exec(t *testing.T, dir, cmd string, args []string, expect string) {
var b bytes.Buffer var b bytes.Buffer
io.Copy(&b, r) io.Copy(&b, r)
output := b.String() 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", t.Errorf("exec %q returned %q wanted %q",
strings.Join(append([]string{cmd}, args...), " "), output, expect) strings.Join(append([]string{cmd}, args...), " "), output, expect)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment