From: Ian Lance Taylor Date: Tue, 16 Jun 2015 18:03:19 +0000 (-0700) Subject: misc/cgo/testshared: make sure rebuilds occur as expected X-Git-Tag: go1.5beta1~218 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=a2aaede366f9bf6d48e6e42be0a86a843f570097;p=gostls13.git 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 Reviewed-by: Yves Junqueira Reviewed-by: Brad Fitzpatrick --- diff --git a/misc/cgo/testshared/shared_test.go b/misc/cgo/testshared/shared_test.go index c73abbf0f4..c36abc3aa8 100644 --- a/misc/cgo/testshared/shared_test.go +++ b/misc/cgo/testshared/shared_test.go @@ -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")