]> Cypherpunks repositories - gostls13.git/commitdiff
misc/cgo/testshared: make sure rebuilds occur as expected
authorIan Lance Taylor <iant@golang.org>
Tue, 16 Jun 2015 18:03:19 +0000 (11:03 -0700)
committerIan Lance Taylor <iant@golang.org>
Wed, 17 Jun 2015 14:55:39 +0000 (14:55 +0000)
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>
misc/cgo/testshared/shared_test.go

index c73abbf0f42de9e813de5c0630527a04b4501de9..c36abc3aa8941ac5ed5f9f0fa1091f951503522f 100644 (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")