Go 1.13 support (#1546)

* tests: fix tests for Go 1.13

- Go 1.13 doesn't autogenerate init functions anymore, tests that
  expected that now fail and should be skipped.
- Plugin tests now need -gcflags'all=-N -l' now, we were probably
  getting lucky with -gcflags='-N -l' before.

* proc: allow signed integers as shift counts

Go1.13 allows signed integers to be used as the right hand side of a
shift operator, change eval to match.

* goversion: update maximum supported version

* travis: force Go to use vendor directory

Travis scripts get confused by "go: downloading" lines, the exact
reason is not clear. Testing that the vendor directory is up to date is
a good idea anyway.
This commit is contained in:
Alessandro Arzilli
2019-06-30 19:34:47 +02:00
committed by Derek Parker
parent a25d2a2b24
commit 55eed318fd
7 changed files with 32 additions and 14 deletions

View File

@ -1810,6 +1810,11 @@ func TestIssue332_Part2(t *testing.T) {
}
func TestIssue396(t *testing.T) {
if goversion.VersionAfterOrEqual(runtime.Version(), 1, 13) {
// CL 161337 in Go 1.13 and later removes the autogenerated init function
// https://go-review.googlesource.com/c/go/+/161337
t.Skip("no autogenerated init function in Go 1.13 or later")
}
withTestProcess("callme", t, func(p proc.Process, fixture protest.Fixture) {
_, err := proc.FindFunctionLocation(p, "main.init", 0)
assertNoError(err, t, "FindFunctionLocation()")
@ -4247,9 +4252,9 @@ func TestDeadlockBreakpoint(t *testing.T) {
}
func TestListImages(t *testing.T) {
pluginFixtures := protest.WithPlugins(t, "plugin1/", "plugin2/")
pluginFixtures := protest.WithPlugins(t, protest.AllNonOptimized, "plugin1/", "plugin2/")
withTestProcessArgs("plugintest", t, ".", []string{pluginFixtures[0].Path, pluginFixtures[1].Path}, 0, func(p proc.Process, fixture protest.Fixture) {
withTestProcessArgs("plugintest", t, ".", []string{pluginFixtures[0].Path, pluginFixtures[1].Path}, protest.AllNonOptimized, func(p proc.Process, fixture protest.Fixture) {
assertNoError(proc.Continue(p), t, "first continue")
f, l := currentLineNumber(p, t)
plugin1Found := false
@ -4367,9 +4372,9 @@ func TestCallConcurrent(t *testing.T) {
}
func TestPluginStepping(t *testing.T) {
pluginFixtures := protest.WithPlugins(t, "plugin1/", "plugin2/")
pluginFixtures := protest.WithPlugins(t, protest.AllNonOptimized, "plugin1/", "plugin2/")
testseq2Args(".", []string{pluginFixtures[0].Path, pluginFixtures[1].Path}, 0, t, "plugintest2", "", []seqTest{
testseq2Args(".", []string{pluginFixtures[0].Path, pluginFixtures[1].Path}, protest.AllNonOptimized, t, "plugintest2", "", []seqTest{
{contContinue, 41},
{contStep, "plugin1.go:9"},
{contStep, "plugin1.go:10"},