1
0
mirror of https://github.com/golang/go synced 2024-11-23 09:40:04 -07:00

misc/cgo/testshared: make sure rebuilds occur as expected

Adjust timestamps in TestABIChecking to make sure that the library and
executable are rebuilt when expected.

Change-Id: I3288c254ba8201b5b4255347b0cb056fa0908657
Reviewed-on: https://go-review.googlesource.com/11128
Reviewed-by: Michael Hudson-Doyle <michael.hudson@canonical.com>
Reviewed-by: Yves Junqueira <yves.junqueira@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Ian Lance Taylor 2015-06-16 11:03:19 -07:00
parent 1fc114c797
commit a2aaede366

View File

@ -633,6 +633,7 @@ func TestABIChecking(t *testing.T) {
// This assumes adding an exported function breaks ABI, which is not true in
// some senses but suffices for the narrow definition of ABI compatiblity the
// toolchain uses today.
resetFileStamps()
appendFile("src/dep/dep.go", "func ABIBreak() {}\n")
goCmd(t, "install", "-buildmode=shared", "-linkshared", "dep")
c := exec.Command("./bin/exe")
@ -662,6 +663,7 @@ func TestABIChecking(t *testing.T) {
// If we make a change which does not break ABI (such as adding an unexported
// function) and rebuild libdep.so, exe still works.
resetFileStamps()
appendFile("src/dep/dep.go", "func noABIBreak() {}\n")
goCmd(t, "install", "-buildmode=shared", "-linkshared", "dep")
run(t, "after non-ABI breaking change", "./bin/exe")