Repo Added
|
Files
7
|
Badge
Embed ▾
README BADGES
|
push
travis-ci
stack: Fix unit test TestAugment on go1.11 and later Zap out arguments expectation on go1.11 and later Where arguments used to be listed explicitly, they are now listed as "(...)". This broke the unit tests. For example with "panic slice_str", go1.10.8 prints: GOTRACEBACK=all panic: ([]string) (0x499cc0,0xc42000a0e0) goroutine 1 [running]: main.panicslicestr(0xc42000a0c0, 0x1, 0x2) (...) whereas on go1.11beta1 the last line is: main.panicslicestr(...) So I bisected Go. In this example, Go is checked out as ~/src/golang, ~/src/golang/bin is in PATH and there's a Go installation at ~/go1.4 for bootstrapping. # Testing script: $ cat > ~/test_golang.sh <<EOF #!/bin/bash set -eu cd ~/src/golang/src ./make.bash go install github.com/maruel/panicparse/cmd/panic panic slice_str |& egrep 'main.panicslicestr\(0x' EOF $ chmod +x ~/test_golang.sh # Bad commit $ cd ~/src/golang $ git merge-base go1.11beta1 origin/master <a class=hub.com/maruel/panicparse/commit/<a class="double-link" href="https://git"><a class=hub.com/maruel/panicparse/commit/a12c1f26e4cc602dae62ec065a237172a5b8f926">a12c1f26e<a href="https://github.com/maruel/panicparse/commit/ea8a9b19730898f560bdd5015200ae9addeaa23d"> $ git checkout a12c1f26e4cc602dae62ec065a237172a5b8f926 # Confirm this exit 1 $ ~/test_golang.sh # Good commit $ git merge-base go1.10 origin/master <a class=hub.com/maruel/panicparse/commit/<a class="double-link" href="https://git"><a class=hub.com/maruel/panicparse/commit/4c4ce3dc79fcf535045e69068b15142d8b7259cd">4c4ce3dc7 $ git checkout 4c4ce3dc79fcf535045e69068b15142d8b7259cd # Confirm this exit 1 $ ~/test_golang.sh # Bisection $ git bisect start a12c1f26e4cc602dae62ec065a237172a5b8f926 $ 4c4ce3dc79fcf535045e69068b15142d8b7259cd $ git bisect run ~/test_golang.sh $ git bisect reset Also fix travis on go1.8.x, lock it to go1.8.7. This is because pcg tries to install goimports, which cannot be built on go1.8.7 anymore.
729 of 1132 relevant lines covered (64.4%)
15.32 hits per line
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|