diff --git a/.travis.yml b/.travis.yml index dde50897..746cbb0d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,4 +17,5 @@ matrix: before_install: - export GOFLAGS=-mod=vendor - - if [ $TRAVIS_OS_NAME = "linux" ]; then sudo apt-get -qq update; sudo apt-get install -y dwz; fi + - if [ $TRAVIS_OS_NAME = "linux" ]; then sudo apt-get -qq update; sudo apt-get install -y dwz; echo "dwz version $(dwz --version)"; fi + diff --git a/pkg/proc/test/support.go b/pkg/proc/test/support.go index ca7dd923..8b502d0e 100644 --- a/pkg/proc/test/support.go +++ b/pkg/proc/test/support.go @@ -8,6 +8,7 @@ import ( "os" "os/exec" "path/filepath" + "regexp" "runtime" "strings" "sync" @@ -138,7 +139,7 @@ func BuildFixture(name string, flags BuildFlags) Fixture { if flags&BuildModePlugin != 0 { buildFlags = append(buildFlags, "-buildmode=plugin") } - if ver.AfterOrEqual(goversion.GoVersion{1, 11, -1, 0, 0, ""}) { + if ver.IsDevel() || ver.AfterOrEqual(goversion.GoVersion{1, 11, -1, 0, 0, ""}) { if flags&EnableDWZCompression != 0 { buildFlags = append(buildFlags, "-ldflags=-compressdwarf=false") } @@ -160,9 +161,11 @@ func BuildFixture(name string, flags BuildFlags) Fixture { if flags&EnableDWZCompression != 0 { cmd := exec.Command("dwz", tmpfile) if out, err := cmd.CombinedOutput(); err != nil { - fmt.Printf("Error running dwz on %s: %s\n", tmpfile, err) - fmt.Printf("%s\n", string(out)) - os.Exit(1) + if regexp.MustCompile(`dwz: Section offsets in (.*?) not monotonically increasing`).FindString(string(out)) == "" { + fmt.Printf("Error running dwz on %s: %s\n", tmpfile, err) + fmt.Printf("%s\n", string(out)) + os.Exit(1) + } } }