Commit a2aaede3 authored by Ian Lance Taylor's avatar Ian Lance Taylor

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/11128Reviewed-by: 's avatarMichael Hudson-Doyle <michael.hudson@canonical.com>
Reviewed-by: 's avatarYves Junqueira <yves.junqueira@gmail.com>
Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 1fc114c7
......@@ -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")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment