]> Cypherpunks repositories - gostls13.git/commit
build: prevent the entire repo to be wiped out by cgo test scripts
authorDidier Spezia <didier.06@gmail.com>
Sat, 2 Jan 2016 14:26:13 +0000 (14:26 +0000)
committerRuss Cox <rsc@golang.org>
Mon, 4 Jan 2016 19:56:30 +0000 (19:56 +0000)
commitdc5315c34108016c0c833f4262da8c72108a826b
tree5586dddea11f37811f2385665fab29d900dc7d6c
parent28b95edff2108c5e567debbf5e65db1a94c2ef39
build: prevent the entire repo to be wiped out by cgo test scripts

Following the parallelization of some tests, a race condition can
occur in testcarchive, testshared and testcshared.

In some cases, it can result in the go env GOROOT command returning
corrupted data, which are then passed to a rm command.

Make the shell script more robust by not trusting the result of
the go env GOROOT command. It does not really fix the issue, but
at least prevent the entire repository to be deleted.

Updates #13789

Change-Id: Iaf04a7bd078ed3a82e724e35c4b86e6f756f2a2f
Reviewed-on: https://go-review.googlesource.com/18173
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
misc/cgo/testcshared/test.bash