1
0
mirror of https://github.com/golang/go synced 2024-07-05 09:50:19 +00:00

test: print output on link -X failure

(Split out from CL 22205.)

Change-Id: Iab66ac2a1cd3716966d8e59c570931bce95aba9b
Reviewed-on: https://go-review.googlesource.com/22297
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
David Crawshaw 2016-04-20 10:29:43 -04:00
parent 46efe0bc7f
commit 7acb642e4f

View File

@ -60,11 +60,11 @@ func test(sep string) {
}
outstr := string(outx)
if !strings.Contains(outstr, "main.b") {
fmt.Printf("-X linker flag did not diagnose overwrite of main.b\n")
fmt.Printf("-X linker flag did not diagnose overwrite of main.b:\n%s\n", outstr)
os.Exit(1)
}
if !strings.Contains(outstr, "main.x") {
fmt.Printf("-X linker flag did not diagnose overwrite of main.x\n")
fmt.Printf("-X linker flag did not diagnose overwrite of main.x:\n%s\n", outstr)
os.Exit(1)
}
}