const (
DefaultOpt = "-gcflags="
NoOpt = "-gcflags=-l -N"
- OptInl4 = "-gcflags=all=-l=4"
+ OptInl4 = "-gcflags=-l=4"
+ OptAllInl4 = "-gcflags=all=-l=4"
)
func TestRuntimeTypesPresent(t *testing.T) {
// Note: this is a build with "-l=4", as opposed to "-l -N". The
// test is intended to verify DWARF that is only generated when
- // the inliner is active.
+ // the inliner is active. We're only going to look at the DWARF for
+ // main.main, however, hence we build with "-gcflags=-l=4" as opposed
+ // to "-gcflags=all=-l=4".
f := gobuild(t, dir, prog, OptInl4)
d, err := f.DWARF()
func TestAbstractOriginSanity(t *testing.T) {
testenv.MustHaveGoBuild(t)
+ if testing.Short() {
+ t.Skip("skipping test in short mode.")
+ }
+
if runtime.GOOS == "plan9" {
t.Skip("skipping on plan9; no DWARF symbol table in executables")
}
if wd, err := os.Getwd(); err == nil {
gopathdir := filepath.Join(wd, "testdata", "httptest")
- abstractOriginSanity(t, gopathdir, OptInl4)
+ abstractOriginSanity(t, gopathdir, OptAllInl4)
} else {
t.Fatalf("os.Getwd() failed %v", err)
}