This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[libgo] Use /usr/bin/pwd in os_test.TestStartProcess on Solaris (PR go/48502)
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Ian Lance Taylor <iant at google dot com>
- Date: Mon, 23 May 2011 12:11:15 +0200
- Subject: [libgo] Use /usr/bin/pwd in os_test.TestStartProcess on Solaris (PR go/48502)
As described in the PR, the go libgo test fails on Solaris since /bin is
a symlink to /usr/bin. Since there is other OS-specific code in
os_test.go, I'm using the follwing patch to fix this.
With that patch, libgo test results on i386-pc-solaris2.11 are clean.
Rainer
2011-05-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR go/48502
* go/os/os_test.go (TestStartProcess): Use /usr/bin/pwd on Solaris.
diff --git a/libgo/go/os/os_test.go b/libgo/go/os/os_test.go
--- a/libgo/go/os/os_test.go
+++ b/libgo/go/os/os_test.go
@@ -440,7 +440,12 @@ func TestStartProcess(t *testing.T) {
args = []string{"/c", "cd"}
} else {
le = "\n"
- cmd = "/bin/pwd"
+ // /bin is a symlink to /usr/bin on Solaris.
+ if syscall.OS == "solaris" {
+ cmd = "/usr/bin/pwd"
+ } else {
+ cmd = "/bin/pwd"
+ }
dir = "/"
args = []string{}
}
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University