Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH v5 00/13] go1.10 update and misc improvements
@ 2018-03-04 21:09 Matt Madison
  2018-03-04 21:09 ` [PATCH v5 01/13] go: update go 1.9 -> go 1.10 Matt Madison
                   ` (13 more replies)
  0 siblings, 14 replies; 22+ messages in thread
From: Matt Madison @ 2018-03-04 21:09 UTC (permalink / raw)
  To: openembedded-core

New in v5:
    * Fixed build problem introduced in v3
      when *not* using security flags
    * Added in a backported go source patch
      fixing a an aarch64 issue (via Khem)
    * Updated the recipe changes to keep the
      1.9 recipes in place
    * Added a GOVERSION setting to tcmode-default.inc
      to allow choosing 1.9 instead of 1.10
    * Collapsed the '-v' removal patch, since
      it was really a fixup for an earlier
      patch in the series.

New in v4:
    * updated the go source patch to protect
      GOROOT to defer generating an error
      until a build action would try to update
      something in GOROOT
    * updated go.bbclass to compile for both
      static and dynamic linking, similar to
      go-runtime
    * fixed missing sign-off

New in v3:
    * reduced one of the go source patches,
      eliminating an unneeded change (thanks
      Otavio)
    * Added bbclass and recipe patches to
      handle SECURITY_CFLAGS settings if
      they're enabled
    * Added go-runtime-staticdev to target-side
      SDK, needed for go static builds (fixes
      test case failure in oe-selftest)
    * two more minor cleanups

New in v2:
    * Fixed Upstream-Status line in go patches
    * Added GOTMPDIR to do_configure[dirs]

Updates to the go recipes and bbclasses for go1.10, which
moves the bulk of the toolchain bootstrap and build out
of the 'make.bash' script and to the 'dist' tool.  This
required a rework of the patches to the go source.

go1.10 introduces significant changes to the go build
tool as well, requiring some further patches to make
it work for OE builds.

See https://golang.org/doc/go1.10 for a complete list
of new features and changes.

Following the update are some cleanup/improvement
patches.

Matt Madison (13):
  go: update go 1.9 -> go 1.10
  go: set GOMIPS envrionment variable
  go.bbclass: rename GO_TMPDIR -> GOTMPDIR
  go.bbclass: remove debug-related commands
  go.bbclass: don't stage test data with sources
  go.bbclass: ptest cleanup and improvements
  goarch.bbclass: disable shared runtime for nativesdk builds
  go: move common settings to go-common.inc
  go.bbclass, goarch.bbclass: update SECURITY_CFLAGS
  go: disable PIE CFLAGS for nativesdk and cross-canadian builds
  packagegroup-go-sdk-target: add go-runtime-staticdev
  go-runtime: remove unneeded nativesdk override, rename variable
  tcmode-default.inc: add settings for go

 meta/classes/go.bbclass                            | 114 +++++----
 meta/classes/goarch.bbclass                        |  14 ++
 meta/conf/distro/include/tcmode-default.inc        |  10 +
 .../packagegroups/packagegroup-go-sdk-target.bb    |   1 +
 meta/recipes-devtools/go/go-1.10.inc               |  22 ++
 ...1-allow-CC-and-CXX-to-have-multiple-words.patch |  33 +++
 ...-content-based-hash-generation-less-pedan.patch | 220 ++++++++++++++++
 ...OLDIR-to-be-overridden-in-the-environment.patch |  64 +++++
 .../0004-ld-add-soname-to-shareable-objects.patch  |  47 ++++
 ...verride-CC-when-building-dist-and-go_boot.patch |  40 +++
 ...-cmd-dist-separate-host-and-target-builds.patch | 277 +++++++++++++++++++++
 ...07-cmd-go-make-GOROOT-precious-by-default.patch | 108 ++++++++
 ...l-obj-arm64-fix-branch-too-far-with-TBZ-l.patch |  58 +++++
 ...ld-replace-glibc-dynamic-linker-with-musl.patch | 130 ++++++++++
 meta/recipes-devtools/go/go-common.inc             |   6 +
 meta/recipes-devtools/go/go-cross-canadian.inc     |  26 +-
 meta/recipes-devtools/go/go-cross-canadian_1.10.bb |   2 +
 meta/recipes-devtools/go/go-cross-canadian_1.9.bb  |  10 +
 meta/recipes-devtools/go/go-cross.inc              |  56 ++---
 meta/recipes-devtools/go/go-cross_1.10.bb          |   2 +
 meta/recipes-devtools/go/go-cross_1.9.bb           |   8 +
 meta/recipes-devtools/go/go-crosssdk.inc           |  14 +-
 meta/recipes-devtools/go/go-crosssdk_1.10.bb       |   2 +
 meta/recipes-devtools/go/go-crosssdk_1.9.bb        |   9 +
 meta/recipes-devtools/go/go-native.inc             |  25 +-
 meta/recipes-devtools/go/go-native_1.10.bb         |   2 +
 meta/recipes-devtools/go/go-native_1.9.bb          |   2 +
 meta/recipes-devtools/go/go-runtime.inc            |  56 ++---
 meta/recipes-devtools/go/go-runtime_1.10.bb        |   2 +
 meta/recipes-devtools/go/go-runtime_1.9.bb         |  21 ++
 meta/recipes-devtools/go/go-target.inc             |  24 +-
 meta/recipes-devtools/go/go_1.10.bb                |   2 +
 meta/recipes-devtools/go/go_1.9.bb                 |  15 ++
 33 files changed, 1260 insertions(+), 162 deletions(-)
 create mode 100644 meta/recipes-devtools/go/go-1.10.inc
 create mode 100644 meta/recipes-devtools/go/go-1.10/0001-allow-CC-and-CXX-to-have-multiple-words.patch
 create mode 100644 meta/recipes-devtools/go/go-1.10/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch
 create mode 100644 meta/recipes-devtools/go/go-1.10/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch
 create mode 100644 meta/recipes-devtools/go/go-1.10/0004-ld-add-soname-to-shareable-objects.patch
 create mode 100644 meta/recipes-devtools/go/go-1.10/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch
 create mode 100644 meta/recipes-devtools/go/go-1.10/0006-cmd-dist-separate-host-and-target-builds.patch
 create mode 100644 meta/recipes-devtools/go/go-1.10/0007-cmd-go-make-GOROOT-precious-by-default.patch
 create mode 100644 meta/recipes-devtools/go/go-1.10/0008-cmd-internal-obj-arm64-fix-branch-too-far-with-TBZ-l.patch
 create mode 100644 meta/recipes-devtools/go/go-1.10/0009-ld-replace-glibc-dynamic-linker-with-musl.patch
 create mode 100644 meta/recipes-devtools/go/go-cross-canadian_1.10.bb
 create mode 100644 meta/recipes-devtools/go/go-cross_1.10.bb
 create mode 100644 meta/recipes-devtools/go/go-crosssdk_1.10.bb
 create mode 100644 meta/recipes-devtools/go/go-native_1.10.bb
 create mode 100644 meta/recipes-devtools/go/go-runtime_1.10.bb
 create mode 100644 meta/recipes-devtools/go/go_1.10.bb

-- 
2.14.1



^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH v5 01/13] go: update go 1.9 -> go 1.10
  2018-03-04 21:09 [PATCH v5 00/13] go1.10 update and misc improvements Matt Madison
@ 2018-03-04 21:09 ` Matt Madison
  2018-03-04 21:09 ` [PATCH v5 02/13] go: set GOMIPS envrionment variable Matt Madison
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 22+ messages in thread
From: Matt Madison @ 2018-03-04 21:09 UTC (permalink / raw)
  To: openembedded-core

* Patches and recipes reworked for go 1.10's significant
  changes to its bootstrap and build steps.

* Update go1.4 source tarball used for go-native
  bootstrapping to the version recommended
  in the current go documentation

* Remove test data from installed sources to eliminate
  some packaging QA warnings

* Set GOCACHE to 'off' to disable 1.10's build caching
  in the go recipes and bbclass

* Update go_do_compile to compile both static and
  dynamic objects dynamic linking is in use, since
  go1.10's build tool is pickier about this

Signed-off-by: Matt Madison <matt@madison.systems>
---
 meta/classes/go.bbclass                            |   6 +
 meta/recipes-devtools/go/go-1.10.inc               |  22 ++
 ...1-allow-CC-and-CXX-to-have-multiple-words.patch |  33 +++
 ...-content-based-hash-generation-less-pedan.patch | 220 ++++++++++++++++
 ...OLDIR-to-be-overridden-in-the-environment.patch |  64 +++++
 .../0004-ld-add-soname-to-shareable-objects.patch  |  47 ++++
 ...verride-CC-when-building-dist-and-go_boot.patch |  40 +++
 ...-cmd-dist-separate-host-and-target-builds.patch | 277 +++++++++++++++++++++
 ...07-cmd-go-make-GOROOT-precious-by-default.patch | 108 ++++++++
 ...l-obj-arm64-fix-branch-too-far-with-TBZ-l.patch |  58 +++++
 ...ld-replace-glibc-dynamic-linker-with-musl.patch | 130 ++++++++++
 meta/recipes-devtools/go/go-common.inc             |   2 +
 meta/recipes-devtools/go/go-cross-canadian.inc     |  27 +-
 meta/recipes-devtools/go/go-cross-canadian_1.10.bb |   2 +
 meta/recipes-devtools/go/go-cross-canadian_1.9.bb  |  10 +
 meta/recipes-devtools/go/go-cross.inc              |  55 ++--
 meta/recipes-devtools/go/go-cross_1.10.bb          |   2 +
 meta/recipes-devtools/go/go-cross_1.9.bb           |   8 +
 meta/recipes-devtools/go/go-crosssdk.inc           |  16 +-
 meta/recipes-devtools/go/go-crosssdk_1.10.bb       |   2 +
 meta/recipes-devtools/go/go-crosssdk_1.9.bb        |   9 +
 meta/recipes-devtools/go/go-native.inc             |  26 +-
 meta/recipes-devtools/go/go-native_1.10.bb         |   2 +
 meta/recipes-devtools/go/go-native_1.9.bb          |   2 +
 meta/recipes-devtools/go/go-runtime.inc            |  58 +++--
 meta/recipes-devtools/go/go-runtime_1.10.bb        |   2 +
 meta/recipes-devtools/go/go-runtime_1.9.bb         |  21 ++
 meta/recipes-devtools/go/go-target.inc             |  21 +-
 meta/recipes-devtools/go/go_1.10.bb                |   2 +
 meta/recipes-devtools/go/go_1.9.bb                 |  15 ++
 30 files changed, 1183 insertions(+), 104 deletions(-)
 create mode 100644 meta/recipes-devtools/go/go-1.10.inc
 create mode 100644 meta/recipes-devtools/go/go-1.10/0001-allow-CC-and-CXX-to-have-multiple-words.patch
 create mode 100644 meta/recipes-devtools/go/go-1.10/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch
 create mode 100644 meta/recipes-devtools/go/go-1.10/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch
 create mode 100644 meta/recipes-devtools/go/go-1.10/0004-ld-add-soname-to-shareable-objects.patch
 create mode 100644 meta/recipes-devtools/go/go-1.10/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch
 create mode 100644 meta/recipes-devtools/go/go-1.10/0006-cmd-dist-separate-host-and-target-builds.patch
 create mode 100644 meta/recipes-devtools/go/go-1.10/0007-cmd-go-make-GOROOT-precious-by-default.patch
 create mode 100644 meta/recipes-devtools/go/go-1.10/0008-cmd-internal-obj-arm64-fix-branch-too-far-with-TBZ-l.patch
 create mode 100644 meta/recipes-devtools/go/go-1.10/0009-ld-replace-glibc-dynamic-linker-with-musl.patch
 create mode 100644 meta/recipes-devtools/go/go-cross-canadian_1.10.bb
 create mode 100644 meta/recipes-devtools/go/go-cross_1.10.bb
 create mode 100644 meta/recipes-devtools/go/go-crosssdk_1.10.bb
 create mode 100644 meta/recipes-devtools/go/go-native_1.10.bb
 create mode 100644 meta/recipes-devtools/go/go-runtime_1.10.bb
 create mode 100644 meta/recipes-devtools/go/go_1.10.bb

diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass
index 7ecd8c9254..a01b28bccd 100644
--- a/meta/classes/go.bbclass
+++ b/meta/classes/go.bbclass
@@ -24,6 +24,7 @@ GO_LINKMODE ?= ""
 GO_LINKMODE_class-nativesdk = "--linkmode=external"
 GO_LDFLAGS ?= '-ldflags="${GO_RPATH} ${GO_LINKMODE} -extldflags '${GO_EXTLDFLAGS}'"'
 export GOBUILDFLAGS ?= "-v ${GO_LDFLAGS}"
+export GOPATH_OMIT_IN_ACTIONID ?= "1"
 export GOPTESTBUILDFLAGS ?= "${GOBUILDFLAGS} -c"
 export GOPTESTFLAGS ?= "-test.v"
 GOBUILDFLAGS_prepend_task-compile = "${GO_PARALLEL_BUILD} "
@@ -47,6 +48,7 @@ GO_INSTALL_FILTEROUT ?= "${GO_IMPORT}/vendor/"
 
 B = "${WORKDIR}/build"
 export GOPATH = "${B}"
+export GOCACHE = "off"
 GO_TMPDIR ?= "${WORKDIR}/go-tmp"
 GO_TMPDIR[vardepvalue] = ""
 
@@ -88,6 +90,10 @@ go_do_compile() {
 	export TMPDIR="${GO_TMPDIR}"
 	${GO} env
 	if [ -n "${GO_INSTALL}" ]; then
+		if [ -n "${GO_LINKSHARED}" ]; then
+			${GO} install ${GOBUILDFLAGS} `go_list_packages`
+			rm -rf ${B}/bin
+		fi
 		${GO} install ${GO_LINKSHARED} ${GOBUILDFLAGS} `go_list_packages`
 	fi
 }
diff --git a/meta/recipes-devtools/go/go-1.10.inc b/meta/recipes-devtools/go/go-1.10.inc
new file mode 100644
index 0000000000..08d1ba6551
--- /dev/null
+++ b/meta/recipes-devtools/go/go-1.10.inc
@@ -0,0 +1,22 @@
+require go-common.inc
+
+GO_BASEVERSION = "1.10"
+FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707"
+
+SRC_URI += "\
+    file://0001-allow-CC-and-CXX-to-have-multiple-words.patch \
+    file://0002-cmd-go-make-content-based-hash-generation-less-pedan.patch \
+    file://0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch \
+    file://0004-ld-add-soname-to-shareable-objects.patch \
+    file://0005-make.bash-override-CC-when-building-dist-and-go_boot.patch \
+    file://0006-cmd-dist-separate-host-and-target-builds.patch \
+    file://0007-cmd-go-make-GOROOT-precious-by-default.patch \
+    file://0008-cmd-internal-obj-arm64-fix-branch-too-far-with-TBZ-l.patch \
+"
+
+SRC_URI_append_libc-musl = " file://0009-ld-replace-glibc-dynamic-linker-with-musl.patch"
+
+SRC_URI[main.md5sum] = "07cbb9d0091b846c6aea40bf5bc0cea7"
+SRC_URI[main.sha256sum] = "f3de49289405fda5fd1483a8fe6bd2fa5469e005fd567df64485c4fa000c7f24"
diff --git a/meta/recipes-devtools/go/go-1.10/0001-allow-CC-and-CXX-to-have-multiple-words.patch b/meta/recipes-devtools/go/go-1.10/0001-allow-CC-and-CXX-to-have-multiple-words.patch
new file mode 100644
index 0000000000..3bb33b0146
--- /dev/null
+++ b/meta/recipes-devtools/go/go-1.10/0001-allow-CC-and-CXX-to-have-multiple-words.patch
@@ -0,0 +1,33 @@
+From 7a7de46129fa6859fb6311096eb9f54c53c7fe2f Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Mon, 19 Feb 2018 08:49:33 -0800
+Subject: [PATCH 1/9] allow CC and CXX to have multiple words
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Matt Madison <matt@madison.systems>
+---
+ src/cmd/go/internal/envcmd/env.go | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/cmd/go/internal/envcmd/env.go b/src/cmd/go/internal/envcmd/env.go
+index 603f7b5060..f891123f9c 100644
+--- a/src/cmd/go/internal/envcmd/env.go
++++ b/src/cmd/go/internal/envcmd/env.go
+@@ -82,11 +82,11 @@ func MkEnv() []cfg.EnvVar {
+ 
+ 	cc := cfg.DefaultCC(cfg.Goos, cfg.Goarch)
+ 	if env := strings.Fields(os.Getenv("CC")); len(env) > 0 {
+-		cc = env[0]
++		cc = strings.Join(env, " ")
+ 	}
+ 	cxx := cfg.DefaultCXX(cfg.Goos, cfg.Goarch)
+ 	if env := strings.Fields(os.Getenv("CXX")); len(env) > 0 {
+-		cxx = env[0]
++		cxx = strings.Join(env, " ")
+ 	}
+ 	env = append(env, cfg.EnvVar{Name: "CC", Value: cc})
+ 	env = append(env, cfg.EnvVar{Name: "CXX", Value: cxx})
+-- 
+2.14.1
+
diff --git a/meta/recipes-devtools/go/go-1.10/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch b/meta/recipes-devtools/go/go-1.10/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch
new file mode 100644
index 0000000000..74f37a99ef
--- /dev/null
+++ b/meta/recipes-devtools/go/go-1.10/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch
@@ -0,0 +1,220 @@
+From 8b2feaee81d7a16adc59e61d06c1e7314d3a5408 Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Mon, 19 Feb 2018 08:50:59 -0800
+Subject: [PATCH 2/9] cmd/go: make content-based hash generation less pedantic
+
+Go 1.10's build tool now uses content-based hashes to
+determine when something should be built or re-built.
+This same mechanism is used to maintain a built-artifact
+cache for speeding up builds.
+
+However, the hashes it generates include information that
+doesn't work well with OE, nor with using a shared runtime
+library.
+
+First, it embeds path names to source files, unless
+building within GOROOT.  This prevents the building
+of a package in GOPATH for later staging into GOROOT.
+
+This patch adds support for the environment variable
+GOPATH_OMIT_IN_ACTIONID.  If present, path name
+embedding is disabled.
+
+Second, if cgo is enabled, the build ID for cgo-related
+packages will include the current value of the environment
+variables for invoking the compiler (CC, CXX, FC) and
+any CGO_xxFLAGS variables.  Only if the settings used
+during a compilation exactly match, character for character,
+the values used for compiling runtime/cgo or any other
+cgo-enabled package being imported, will the tool
+decide that the imported package is up-to-date.
+
+This is done to help ensure correctness, but is overly
+simplistic and effectively prevents the reuse of built
+artifacts that use cgo (or shared runtime, which includes
+runtime/cgo).
+
+This patch filters out all compiler flags except those
+beginning with '-m'.  The default behavior can be restored
+by setting the CGO_PEDANTIC environment variable.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Matt Madison <matt@madison.systems>
+---
+ src/cmd/go/internal/envcmd/env.go |  2 +-
+ src/cmd/go/internal/work/exec.go  | 63 ++++++++++++++++++++++++++++-----------
+ 2 files changed, 46 insertions(+), 19 deletions(-)
+
+diff --git a/src/cmd/go/internal/envcmd/env.go b/src/cmd/go/internal/envcmd/env.go
+index f891123f9c..ebacfbfdbc 100644
+--- a/src/cmd/go/internal/envcmd/env.go
++++ b/src/cmd/go/internal/envcmd/env.go
+@@ -113,7 +113,7 @@ func findEnv(env []cfg.EnvVar, name string) string {
+ func ExtraEnvVars() []cfg.EnvVar {
+ 	var b work.Builder
+ 	b.Init()
+-	cppflags, cflags, cxxflags, fflags, ldflags, err := b.CFlags(&load.Package{})
++	cppflags, cflags, cxxflags, fflags, ldflags, err := b.CFlags(&load.Package{}, false)
+ 	if err != nil {
+ 		// Should not happen - b.CFlags was given an empty package.
+ 		fmt.Fprintf(os.Stderr, "go: invalid cflags: %v\n", err)
+diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go
+index c4c1500eb2..b0f6b45647 100644
+--- a/src/cmd/go/internal/work/exec.go
++++ b/src/cmd/go/internal/work/exec.go
+@@ -173,6 +173,8 @@ func (b *Builder) Do(root *Action) {
+ 	wg.Wait()
+ }
+ 
++var omitGopath = os.Getenv("GOPATH_OMIT_IN_ACTIONID") != ""
++
+ // buildActionID computes the action ID for a build action.
+ func (b *Builder) buildActionID(a *Action) cache.ActionID {
+ 	p := a.Package
+@@ -189,7 +191,7 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID {
+ 	// but it does not hide the exact value of $GOPATH.
+ 	// Include the full dir in that case.
+ 	// Assume b.WorkDir is being trimmed properly.
+-	if !p.Goroot && !strings.HasPrefix(p.Dir, b.WorkDir) {
++	if !p.Goroot && !omitGopath && !strings.HasPrefix(p.Dir, b.WorkDir) {
+ 		fmt.Fprintf(h, "dir %s\n", p.Dir)
+ 	}
+ 	fmt.Fprintf(h, "goos %s goarch %s\n", cfg.Goos, cfg.Goarch)
+@@ -197,13 +199,13 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID {
+ 	fmt.Fprintf(h, "omitdebug %v standard %v local %v prefix %q\n", p.Internal.OmitDebug, p.Standard, p.Internal.Local, p.Internal.LocalPrefix)
+ 	if len(p.CgoFiles)+len(p.SwigFiles) > 0 {
+ 		fmt.Fprintf(h, "cgo %q\n", b.toolID("cgo"))
+-		cppflags, cflags, cxxflags, fflags, _, _ := b.CFlags(p)
+-		fmt.Fprintf(h, "CC=%q %q %q\n", b.ccExe(), cppflags, cflags)
++		cppflags, cflags, cxxflags, fflags, _, _ := b.CFlags(p, true)
++		fmt.Fprintf(h, "CC=%q %q %q\n", b.ccExe(true), cppflags, cflags)
+ 		if len(p.CXXFiles)+len(p.SwigFiles) > 0 {
+-			fmt.Fprintf(h, "CXX=%q %q\n", b.cxxExe(), cxxflags)
++			fmt.Fprintf(h, "CXX=%q %q\n", b.cxxExe(true), cxxflags)
+ 		}
+ 		if len(p.FFiles) > 0 {
+-			fmt.Fprintf(h, "FC=%q %q\n", b.fcExe(), fflags)
++			fmt.Fprintf(h, "FC=%q %q\n", b.fcExe(true), fflags)
+ 		}
+ 		// TODO(rsc): Should we include the SWIG version or Fortran/GCC/G++/Objective-C compiler versions?
+ 	}
+@@ -1731,33 +1733,33 @@ var (
+ // gccCmd returns a gcc command line prefix
+ // defaultCC is defined in zdefaultcc.go, written by cmd/dist.
+ func (b *Builder) GccCmd(incdir, workdir string) []string {
+-	return b.compilerCmd(b.ccExe(), incdir, workdir)
++	return b.compilerCmd(b.ccExe(false), incdir, workdir)
+ }
+ 
+ // gxxCmd returns a g++ command line prefix
+ // defaultCXX is defined in zdefaultcc.go, written by cmd/dist.
+ func (b *Builder) GxxCmd(incdir, workdir string) []string {
+-	return b.compilerCmd(b.cxxExe(), incdir, workdir)
++	return b.compilerCmd(b.cxxExe(false), incdir, workdir)
+ }
+ 
+ // gfortranCmd returns a gfortran command line prefix.
+ func (b *Builder) gfortranCmd(incdir, workdir string) []string {
+-	return b.compilerCmd(b.fcExe(), incdir, workdir)
++	return b.compilerCmd(b.fcExe(false), incdir, workdir)
+ }
+ 
+ // ccExe returns the CC compiler setting without all the extra flags we add implicitly.
+-func (b *Builder) ccExe() []string {
+-	return b.compilerExe(origCC, cfg.DefaultCC(cfg.Goos, cfg.Goarch))
++func (b *Builder) ccExe(filtered bool) []string {
++	return b.compilerExe(origCC, cfg.DefaultCC(cfg.Goos, cfg.Goarch), filtered)
+ }
+ 
+ // cxxExe returns the CXX compiler setting without all the extra flags we add implicitly.
+-func (b *Builder) cxxExe() []string {
+-	return b.compilerExe(origCXX, cfg.DefaultCXX(cfg.Goos, cfg.Goarch))
++func (b *Builder) cxxExe(filtered bool) []string {
++	return b.compilerExe(origCXX, cfg.DefaultCXX(cfg.Goos, cfg.Goarch), filtered)
+ }
+ 
+ // fcExe returns the FC compiler setting without all the extra flags we add implicitly.
+-func (b *Builder) fcExe() []string {
+-	return b.compilerExe(os.Getenv("FC"), "gfortran")
++func (b *Builder) fcExe(filtered bool) []string {
++	return b.compilerExe(os.Getenv("FC"), "gfortran", filtered)
+ }
+ 
+ // compilerExe returns the compiler to use given an
+@@ -1766,11 +1768,14 @@ func (b *Builder) fcExe() []string {
+ // of the compiler but can have additional arguments if they
+ // were present in the environment value.
+ // For example if CC="gcc -DGOPHER" then the result is ["gcc", "-DGOPHER"].
+-func (b *Builder) compilerExe(envValue string, def string) []string {
++func (b *Builder) compilerExe(envValue string, def string, filtered bool) []string {
+ 	compiler := strings.Fields(envValue)
+ 	if len(compiler) == 0 {
+ 		compiler = []string{def}
+ 	}
++	if filtered {
++		return append(compiler[0:1], filterCompilerFlags(compiler[1:])...)
++	}
+ 	return compiler
+ }
+ 
+@@ -1920,8 +1925,23 @@ func envList(key, def string) []string {
+ 	return strings.Fields(v)
+ }
+ 
++var filterFlags = os.Getenv("CGO_PEDANTIC") == ""
++
++func filterCompilerFlags(flags []string) []string {
++	var newflags []string
++	if !filterFlags {
++		return flags
++	}
++	for _, flag := range flags {
++		if strings.HasPrefix(flag, "-m") {
++			newflags = append(newflags, flag)
++		}
++	}
++	return newflags
++}
++
+ // CFlags returns the flags to use when invoking the C, C++ or Fortran compilers, or cgo.
+-func (b *Builder) CFlags(p *load.Package) (cppflags, cflags, cxxflags, fflags, ldflags []string, err error) {
++func (b *Builder) CFlags(p *load.Package, filtered bool) (cppflags, cflags, cxxflags, fflags, ldflags []string, err error) {
+ 	defaults := "-g -O2"
+ 
+ 	if cppflags, err = buildFlags("CPPFLAGS", "", p.CgoCPPFLAGS, checkCompilerFlags); err != nil {
+@@ -1939,6 +1959,13 @@ func (b *Builder) CFlags(p *load.Package) (cppflags, cflags, cxxflags, fflags, l
+ 	if ldflags, err = buildFlags("LDFLAGS", defaults, p.CgoLDFLAGS, checkLinkerFlags); err != nil {
+ 		return
+ 	}
++	if filtered {
++		cppflags = filterCompilerFlags(cppflags)
++		cflags = filterCompilerFlags(cflags)
++		cxxflags = filterCompilerFlags(cxxflags)
++		fflags = filterCompilerFlags(fflags)
++		ldflags = filterCompilerFlags(ldflags)
++	}
+ 
+ 	return
+ }
+@@ -1954,7 +1981,7 @@ var cgoRe = regexp.MustCompile(`[/\\:]`)
+ 
+ func (b *Builder) cgo(a *Action, cgoExe, objdir string, pcCFLAGS, pcLDFLAGS, cgofiles, gccfiles, gxxfiles, mfiles, ffiles []string) (outGo, outObj []string, err error) {
+ 	p := a.Package
+-	cgoCPPFLAGS, cgoCFLAGS, cgoCXXFLAGS, cgoFFLAGS, cgoLDFLAGS, err := b.CFlags(p)
++	cgoCPPFLAGS, cgoCFLAGS, cgoCXXFLAGS, cgoFFLAGS, cgoLDFLAGS, err := b.CFlags(p, false)
+ 	if err != nil {
+ 		return nil, nil, err
+ 	}
+@@ -2306,7 +2333,7 @@ func (b *Builder) swigIntSize(objdir string) (intsize string, err error) {
+ 
+ // Run SWIG on one SWIG input file.
+ func (b *Builder) swigOne(a *Action, p *load.Package, file, objdir string, pcCFLAGS []string, cxx bool, intgosize string) (outGo, outC string, err error) {
+-	cgoCPPFLAGS, cgoCFLAGS, cgoCXXFLAGS, _, _, err := b.CFlags(p)
++	cgoCPPFLAGS, cgoCFLAGS, cgoCXXFLAGS, _, _, err := b.CFlags(p, false)
+ 	if err != nil {
+ 		return "", "", err
+ 	}
+-- 
+2.14.1
+
diff --git a/meta/recipes-devtools/go/go-1.10/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch b/meta/recipes-devtools/go/go-1.10/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch
new file mode 100644
index 0000000000..818fe66700
--- /dev/null
+++ b/meta/recipes-devtools/go/go-1.10/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch
@@ -0,0 +1,64 @@
+From acd179b49f1fc8d6f7f69e569fb4a56039c725a1 Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Sat, 17 Feb 2018 05:24:20 -0800
+Subject: [PATCH 3/9] allow GOTOOLDIR to be overridden in the environment
+
+to allow for split host/target build roots
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Matt Madison <matt@madison.systems>
+---
+ src/cmd/dist/build.go          | 4 +++-
+ src/cmd/go/internal/cfg/cfg.go | 6 +++++-
+ src/go/build/build.go          | 2 +-
+ 3 files changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go
+index 49ed80033e..afc615b5c2 100644
+--- a/src/cmd/dist/build.go
++++ b/src/cmd/dist/build.go
+@@ -220,7 +220,9 @@ func xinit() {
+ 	workdir = xworkdir()
+ 	xatexit(rmworkdir)
+ 
+-	tooldir = pathf("%s/pkg/tool/%s_%s", goroot, gohostos, gohostarch)
++	if tooldir = os.Getenv("GOTOOLDIR"); tooldir == "" {
++		tooldir = pathf("%s/pkg/tool/%s_%s", goroot, gohostos, gohostarch)
++	}
+ }
+ 
+ // compilerEnv returns a map from "goos/goarch" to the
+diff --git a/src/cmd/go/internal/cfg/cfg.go b/src/cmd/go/internal/cfg/cfg.go
+index 1de4f0dc79..4f6010d660 100644
+--- a/src/cmd/go/internal/cfg/cfg.go
++++ b/src/cmd/go/internal/cfg/cfg.go
+@@ -96,7 +96,11 @@ func init() {
+ 	// as the tool directory does not move based on environment variables.
+ 	// This matches the initialization of ToolDir in go/build,
+ 	// except for using GOROOT rather than runtime.GOROOT().
+-	build.ToolDir = filepath.Join(GOROOT, "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH)
++	if s := os.Getenv("GOTOOLDIR"); s != "" {
++		build.ToolDir = filepath.Clean(s)
++	} else {
++		build.ToolDir = filepath.Join(GOROOT, "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH)
++	}
+ }
+ 
+ func findGOROOT() string {
+diff --git a/src/go/build/build.go b/src/go/build/build.go
+index 68fb423983..81b1b32270 100644
+--- a/src/go/build/build.go
++++ b/src/go/build/build.go
+@@ -1594,7 +1594,7 @@ func init() {
+ }
+ 
+ // ToolDir is the directory containing build tools.
+-var ToolDir = filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH)
++var ToolDir = envOr("GOTOOLDIR", filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH))
+ 
+ // IsLocalImport reports whether the import path is
+ // a local import path, like ".", "..", "./foo", or "../foo".
+-- 
+2.14.1
+
diff --git a/meta/recipes-devtools/go/go-1.10/0004-ld-add-soname-to-shareable-objects.patch b/meta/recipes-devtools/go/go-1.10/0004-ld-add-soname-to-shareable-objects.patch
new file mode 100644
index 0000000000..c23ca94290
--- /dev/null
+++ b/meta/recipes-devtools/go/go-1.10/0004-ld-add-soname-to-shareable-objects.patch
@@ -0,0 +1,47 @@
+From 85252f0bd8743223eb778edbe9fb31dff17a23d8 Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Sat, 17 Feb 2018 06:26:10 -0800
+Subject: [PATCH 4/9] ld: add soname to shareable objects
+
+so that OE's shared library dependency handling
+can find them.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Matt Madison <matt@madison.systems>
+---
+ src/cmd/link/internal/ld/lib.go | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go
+index 6dcaf64122..11cbb8a8bb 100644
+--- a/src/cmd/link/internal/ld/lib.go
++++ b/src/cmd/link/internal/ld/lib.go
+@@ -1134,6 +1134,7 @@ func (ctxt *Link) hostlink() {
+ 				argv = append(argv, "-Wl,-z,relro")
+ 			}
+ 			argv = append(argv, "-shared")
++			argv = append(argv, fmt.Sprintf("-Wl,-soname,%s", filepath.Base(*flagOutfile)))
+ 			if ctxt.HeadType != objabi.Hwindows {
+ 				// Pass -z nodelete to mark the shared library as
+ 				// non-closeable: a dlclose will do nothing.
+@@ -1145,6 +1146,8 @@ func (ctxt *Link) hostlink() {
+ 			argv = append(argv, "-Wl,-z,relro")
+ 		}
+ 		argv = append(argv, "-shared")
++		argv = append(argv, fmt.Sprintf("-Wl,-soname,%s", filepath.Base(*flagOutfile)))
++
+ 	case BuildModePlugin:
+ 		if ctxt.HeadType == objabi.Hdarwin {
+ 			argv = append(argv, "-dynamiclib")
+@@ -1153,6 +1156,7 @@ func (ctxt *Link) hostlink() {
+ 				argv = append(argv, "-Wl,-z,relro")
+ 			}
+ 			argv = append(argv, "-shared")
++			argv = append(argv, fmt.Sprintf("-Wl,-soname,%s", filepath.Base(*flagOutfile)))
+ 		}
+ 	}
+ 
+-- 
+2.14.1
+
diff --git a/meta/recipes-devtools/go/go-1.10/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch b/meta/recipes-devtools/go/go-1.10/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch
new file mode 100644
index 0000000000..67a93939f5
--- /dev/null
+++ b/meta/recipes-devtools/go/go-1.10/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch
@@ -0,0 +1,40 @@
+From 16124d84648f4dfdfa4738c5660b5400b30bf9da Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Sat, 17 Feb 2018 06:32:45 -0800
+Subject: [PATCH 5/9] make.bash: override CC when building dist and
+ go_bootstrap
+
+for handling OE cross-canadian builds.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Matt Madison <matt@madison.systems>
+---
+ src/make.bash | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/make.bash b/src/make.bash
+index 93a5c43d11..3a63682bc4 100755
+--- a/src/make.bash
++++ b/src/make.bash
+@@ -162,7 +162,7 @@ if [ "$GOROOT_BOOTSTRAP" = "$GOROOT" ]; then
+ 	exit 1
+ fi
+ rm -f cmd/dist/dist
+-GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist
++CC="${BUILD_CC:-${CC}}" GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist
+ 
+ # -e doesn't propagate out of eval, so check success by hand.
+ eval $(./cmd/dist/dist env -p || echo FAIL=true)
+@@ -193,7 +193,7 @@ fi
+ # Run dist bootstrap to complete make.bash.
+ # Bootstrap installs a proper cmd/dist, built with the new toolchain.
+ # Throw ours, built with Go 1.4, away after bootstrap.
+-./cmd/dist/dist bootstrap $buildall $vflag $GO_DISTFLAGS "$@"
++CC="${BUILD_CC:-${CC}}" ./cmd/dist/dist bootstrap $buildall $vflag $GO_DISTFLAGS "$@"
+ rm -f ./cmd/dist/dist
+ 
+ # DO NOT ADD ANY NEW CODE HERE.
+-- 
+2.14.1
+
diff --git a/meta/recipes-devtools/go/go-1.10/0006-cmd-dist-separate-host-and-target-builds.patch b/meta/recipes-devtools/go/go-1.10/0006-cmd-dist-separate-host-and-target-builds.patch
new file mode 100644
index 0000000000..9fe6996284
--- /dev/null
+++ b/meta/recipes-devtools/go/go-1.10/0006-cmd-dist-separate-host-and-target-builds.patch
@@ -0,0 +1,277 @@
+From 2f07af34697c61decdcfa5b11434451fbcf37704 Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Sat, 17 Feb 2018 10:03:48 -0800
+Subject: [PATCH 6/9] cmd/dist: separate host and target builds
+
+Change the dist tool to allow for OE-style cross-
+and cross-canadian builds:
+
+ - command flags --host-only and --target only are added;
+   if one is present, the other changes mentioned below
+   take effect, and arguments may also be specified on
+   the command line to enumerate the package(s) to be
+   built.
+
+ - for OE cross builds, go_bootstrap is always built for
+   the current build host, and is moved, along with the supporting
+   toolchain (asm, compile, etc.) to a separate 'native_native'
+   directory under GOROOT/pkg/tool.
+
+ - go_bootstrap is not automatically removed after the build,
+   so it can be reused later (e.g., building both static and
+   shared runtime).
+
+Note that for --host-only builds, it would be nice to specify
+just the "cmd" package to build only the go commands/tools,
+the staleness checks in the dist tool will fail if the "std"
+library has not also been built.  So host-only builds have to
+build everything anyway.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Matt Madison <matt@madison.systems>
+
+more dist cleanup
+---
+ src/cmd/dist/build.go | 149 +++++++++++++++++++++++++++++++++++++-------------
+ 1 file changed, 111 insertions(+), 38 deletions(-)
+
+diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go
+index afc615b5c2..36262665b2 100644
+--- a/src/cmd/dist/build.go
++++ b/src/cmd/dist/build.go
+@@ -38,6 +38,7 @@ var (
+ 	goldflags        string
+ 	workdir          string
+ 	tooldir          string
++	build_tooldir	 string
+ 	oldgoos          string
+ 	oldgoarch        string
+ 	exe              string
+@@ -49,6 +50,7 @@ var (
+ 
+ 	rebuildall   bool
+ 	defaultclang bool
++	crossBuild   bool
+ 
+ 	vflag int // verbosity
+ )
+@@ -223,6 +225,8 @@ func xinit() {
+ 	if tooldir = os.Getenv("GOTOOLDIR"); tooldir == "" {
+ 		tooldir = pathf("%s/pkg/tool/%s_%s", goroot, gohostos, gohostarch)
+ 	}
++	build_tooldir = pathf("%s/pkg/tool/native_native", goroot)
++
+ }
+ 
+ // compilerEnv returns a map from "goos/goarch" to the
+@@ -252,7 +256,6 @@ func compilerEnv(envName, def string) map[string]string {
+ 		if gohostos != goos || gohostarch != goarch {
+ 			m[gohostos+"/"+gohostarch] = m[""]
+ 		}
+-		m[""] = env
+ 	}
+ 
+ 	for _, goos := range okgoos {
+@@ -479,8 +482,10 @@ func setup() {
+ 	// We keep it in pkg/, just like the object directory above.
+ 	if rebuildall {
+ 		xremoveall(tooldir)
++		xremoveall(build_tooldir)
+ 	}
+ 	xmkdirall(tooldir)
++	xmkdirall(build_tooldir)
+ 
+ 	// Remove tool binaries from before the tool/gohostos_gohostarch
+ 	xremoveall(pathf("%s/bin/tool", goroot))
+@@ -1130,11 +1135,29 @@ func cmdbootstrap() {
+ 
+ 	var noBanner bool
+ 	var debug bool
++	var hostOnly bool
++	var targetOnly bool
++	var toBuild = []string { "std", "cmd" }
++
+ 	flag.BoolVar(&rebuildall, "a", rebuildall, "rebuild all")
+ 	flag.BoolVar(&debug, "d", debug, "enable debugging of bootstrap process")
+ 	flag.BoolVar(&noBanner, "no-banner", noBanner, "do not print banner")
++	flag.BoolVar(&hostOnly, "host-only", hostOnly, "build only host binaries, not target")
++	flag.BoolVar(&targetOnly, "target-only", targetOnly, "build only target binaries, not host")
+ 
+-	xflagparse(0)
++	xflagparse(-1)
++
++	if (hostOnly && targetOnly) {
++		fatalf("specify only one of --host-only or --target-only\n")
++	}
++	crossBuild = hostOnly || targetOnly
++	if flag.NArg() > 0 {
++		if crossBuild {
++			toBuild = flag.Args()
++		} else {
++			fatalf("package names not permitted without --host-only or --target-only\n")
++		}
++	}
+ 
+ 	if debug {
+ 		// cmd/buildid is used in debug mode.
+@@ -1182,8 +1205,13 @@ func cmdbootstrap() {
+ 		xprintf("\n")
+ 	}
+ 
+-	gogcflags = os.Getenv("GO_GCFLAGS") // we were using $BOOT_GO_GCFLAGS until now
+-	goldflags = os.Getenv("GO_LDFLAGS")
++	// For split host/target cross/cross-canadian builds, we don't
++	// want to be setting these flags until after we have compiled
++	// the toolchain that runs on the build host.
++	if ! crossBuild {
++		gogcflags = os.Getenv("GO_GCFLAGS") // we were using $BOOT_GO_GCFLAGS until now
++		goldflags = os.Getenv("GO_LDFLAGS")
++	}
+ 	goBootstrap := pathf("%s/go_bootstrap", tooldir)
+ 	cmdGo := pathf("%s/go", gobin)
+ 	if debug {
+@@ -1212,7 +1240,11 @@ func cmdbootstrap() {
+ 		xprintf("\n")
+ 	}
+ 	xprintf("Building Go toolchain2 using go_bootstrap and Go toolchain1.\n")
+-	os.Setenv("CC", compilerEnvLookup(defaultcc, goos, goarch))
++	if crossBuild {
++		os.Setenv("CC", defaultcc[""])
++	} else {
++		os.Setenv("CC", compilerEnvLookup(defaultcc, goos, goarch))
++	}
+ 	goInstall(goBootstrap, append([]string{"-i"}, toolchain...)...)
+ 	if debug {
+ 		run("", ShowOutput|CheckExit, pathf("%s/compile", tooldir), "-V=full")
+@@ -1249,45 +1281,82 @@ func cmdbootstrap() {
+ 	}
+ 	checkNotStale(goBootstrap, append(toolchain, "runtime/internal/sys")...)
+ 
+-	if goos == oldgoos && goarch == oldgoarch {
+-		// Common case - not setting up for cross-compilation.
+-		timelog("build", "toolchain")
+-		if vflag > 0 {
+-			xprintf("\n")
++	if crossBuild {
++		gogcflags = os.Getenv("GO_GCFLAGS")
++		goldflags = os.Getenv("GO_LDFLAGS")
++		tool_files, _ := filepath.Glob(pathf("%s/*", tooldir))
++		for _, f := range tool_files {
++			copyfile(pathf("%s/%s", build_tooldir, filepath.Base(f)), f, writeExec)
++			xremove(f)
++		}
++		os.Setenv("GOTOOLDIR", build_tooldir)
++		goBootstrap = pathf("%s/go_bootstrap", build_tooldir)
++		if hostOnly {
++			timelog("build", "host toolchain")
++			if vflag > 0 {
++				xprintf("\n")
++			}
++			xprintf("Building %s for host, %s/%s.\n", strings.Join(toBuild, ","), goos, goarch)
++			goInstall(goBootstrap, toBuild...)
++			checkNotStale(goBootstrap, toBuild...)
++			// Skip cmdGo staleness checks here, since we can't necessarily run the cmdGo binary
++
++			timelog("build", "target toolchain")
++			if vflag > 0 {
++				xprintf("\n")
++			}
++		} else if targetOnly {
++			goos = oldgoos
++			goarch = oldgoarch
++			os.Setenv("GOOS", goos)
++			os.Setenv("GOARCH", goarch)
++			os.Setenv("CC", compilerEnvLookup(defaultcc, goos, goarch))
++			xprintf("Building %s for target, %s/%s.\n", strings.Join(toBuild, ","), goos, goarch)
++			goInstall(goBootstrap, toBuild...)
++			checkNotStale(goBootstrap, toBuild...)
++			// Skip cmdGo staleness checks here, since we can't run the target's cmdGo binary
+ 		}
+-		xprintf("Building packages and commands for %s/%s.\n", goos, goarch)
+ 	} else {
+-		// GOOS/GOARCH does not match GOHOSTOS/GOHOSTARCH.
+-		// Finish GOHOSTOS/GOHOSTARCH installation and then
+-		// run GOOS/GOARCH installation.
+-		timelog("build", "host toolchain")
+-		if vflag > 0 {
+-			xprintf("\n")
++		if goos == oldgoos && goarch == oldgoarch {
++			// Common case - not setting up for cross-compilation.
++			timelog("build", "toolchain")
++			if vflag > 0 {
++				xprintf("\n")
++			}
++			xprintf("Building packages and commands for %s/%s.\n", goos, goarch)
++		} else {
++			// GOOS/GOARCH does not match GOHOSTOS/GOHOSTARCH.
++			// Finish GOHOSTOS/GOHOSTARCH installation and then
++			// run GOOS/GOARCH installation.
++			timelog("build", "host toolchain")
++			if vflag > 0 {
++				xprintf("\n")
++			}
++			xprintf("Building packages and commands for host, %s/%s.\n", goos, goarch)
++			goInstall(goBootstrap, "std", "cmd")
++			checkNotStale(goBootstrap, "std", "cmd")
++			checkNotStale(cmdGo, "std", "cmd")
++
++			timelog("build", "target toolchain")
++			if vflag > 0 {
++				xprintf("\n")
++			}
++			goos = oldgoos
++			goarch = oldgoarch
++			os.Setenv("GOOS", goos)
++			os.Setenv("GOARCH", goarch)
++			os.Setenv("CC", compilerEnvLookup(defaultcc, goos, goarch))
++			xprintf("Building packages and commands for target, %s/%s.\n", goos, goarch)
+ 		}
+-		xprintf("Building packages and commands for host, %s/%s.\n", goos, goarch)
+ 		goInstall(goBootstrap, "std", "cmd")
+ 		checkNotStale(goBootstrap, "std", "cmd")
+ 		checkNotStale(cmdGo, "std", "cmd")
+-
+-		timelog("build", "target toolchain")
+-		if vflag > 0 {
+-			xprintf("\n")
++		if debug {
++			run("", ShowOutput|CheckExit, pathf("%s/compile", tooldir), "-V=full")
++			run("", ShowOutput|CheckExit, pathf("%s/buildid", tooldir), pathf("%s/pkg/%s_%s/runtime/internal/sys.a", goroot, goos, goarch))
++			checkNotStale(goBootstrap, append(toolchain, "runtime/internal/sys")...)
++			copyfile(pathf("%s/compile4", tooldir), pathf("%s/compile", tooldir), writeExec)
+ 		}
+-		goos = oldgoos
+-		goarch = oldgoarch
+-		os.Setenv("GOOS", goos)
+-		os.Setenv("GOARCH", goarch)
+-		os.Setenv("CC", compilerEnvLookup(defaultcc, goos, goarch))
+-		xprintf("Building packages and commands for target, %s/%s.\n", goos, goarch)
+-	}
+-	goInstall(goBootstrap, "std", "cmd")
+-	checkNotStale(goBootstrap, "std", "cmd")
+-	checkNotStale(cmdGo, "std", "cmd")
+-	if debug {
+-		run("", ShowOutput|CheckExit, pathf("%s/compile", tooldir), "-V=full")
+-		run("", ShowOutput|CheckExit, pathf("%s/buildid", tooldir), pathf("%s/pkg/%s_%s/runtime/internal/sys.a", goroot, goos, goarch))
+-		checkNotStale(goBootstrap, append(toolchain, "runtime/internal/sys")...)
+-		copyfile(pathf("%s/compile4", tooldir), pathf("%s/compile", tooldir), writeExec)
+ 	}
+ 
+ 	// Check that there are no new files in $GOROOT/bin other than
+@@ -1305,7 +1374,11 @@ func cmdbootstrap() {
+ 	}
+ 
+ 	// Remove go_bootstrap now that we're done.
+-	xremove(pathf("%s/go_bootstrap", tooldir))
++	// Except that for split host/target cross-builds, we need to
++	// keep it.
++	if ! crossBuild {
++		xremove(pathf("%s/go_bootstrap", tooldir))
++	}
+ 
+ 	// Print trailing banner unless instructed otherwise.
+ 	if !noBanner {
+-- 
+2.14.1
+
diff --git a/meta/recipes-devtools/go/go-1.10/0007-cmd-go-make-GOROOT-precious-by-default.patch b/meta/recipes-devtools/go/go-1.10/0007-cmd-go-make-GOROOT-precious-by-default.patch
new file mode 100644
index 0000000000..72427627bc
--- /dev/null
+++ b/meta/recipes-devtools/go/go-1.10/0007-cmd-go-make-GOROOT-precious-by-default.patch
@@ -0,0 +1,108 @@
+From f98aa287941417226a6e4f78759f8a5e19732cde Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Fri, 2 Mar 2018 06:00:20 -0800
+Subject: [PATCH 7/9] cmd/go: make GOROOT precious by default
+
+The go build tool normally rebuilds whatever it detects is
+stale.  This can be a problem when GOROOT is intended to
+be read-only and the go runtime has been built as a shared
+library, since we don't want every application to be rebuilding
+the shared runtime - particularly in cross-build/packaging
+setups, since that would lead to 'abi mismatch' runtime errors.
+
+This patch prevents the install and linkshared actions from
+installing to GOROOT unless overridden with the GOROOT_OVERRIDE
+environment variable.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Matt Madison <matt@madison.systems>
+---
+ src/cmd/go/internal/work/action.go |  3 +++
+ src/cmd/go/internal/work/build.go  |  5 +++++
+ src/cmd/go/internal/work/exec.go   | 25 +++++++++++++++++++++++++
+ 3 files changed, 33 insertions(+)
+
+diff --git a/src/cmd/go/internal/work/action.go b/src/cmd/go/internal/work/action.go
+index 9f1f8f8a50..a382880474 100644
+--- a/src/cmd/go/internal/work/action.go
++++ b/src/cmd/go/internal/work/action.go
+@@ -563,6 +563,9 @@ func (b *Builder) addTransitiveLinkDeps(a, a1 *Action, shlib string) {
+ 			if p1 == nil || p1.Shlib == "" || haveShlib[filepath.Base(p1.Shlib)] {
+ 				continue
+ 			}
++			if goRootPrecious && (p1.Standard || p1.Goroot) {
++				continue
++			}
+ 			haveShlib[filepath.Base(p1.Shlib)] = true
+ 			// TODO(rsc): The use of ModeInstall here is suspect, but if we only do ModeBuild,
+ 			// we'll end up building an overall library or executable that depends at runtime
+diff --git a/src/cmd/go/internal/work/build.go b/src/cmd/go/internal/work/build.go
+index 57b7b00879..e2ba95420e 100644
+--- a/src/cmd/go/internal/work/build.go
++++ b/src/cmd/go/internal/work/build.go
+@@ -143,6 +143,7 @@ See also: go install, go get, go clean.
+ }
+ 
+ const concurrentGCBackendCompilationEnabledByDefault = true
++var goRootPrecious bool = true
+ 
+ func init() {
+ 	// break init cycle
+@@ -156,6 +157,10 @@ func init() {
+ 
+ 	AddBuildFlags(CmdBuild)
+ 	AddBuildFlags(CmdInstall)
++
++	if x := os.Getenv("GOROOT_OVERRIDE"); x != "" {
++		goRootPrecious = false
++	}
+ }
+ 
+ // Note that flags consulted by other parts of the code
+diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go
+index b0f6b45647..c8f266a8ad 100644
+--- a/src/cmd/go/internal/work/exec.go
++++ b/src/cmd/go/internal/work/exec.go
+@@ -371,6 +371,23 @@ func (b *Builder) build(a *Action) (err error) {
+ 		return fmt.Errorf("missing or invalid binary-only package")
+ 	}
+ 
++	if goRootPrecious && (a.Package.Standard || a.Package.Goroot) {
++		_, err := os.Stat(a.Package.Target)
++		if err == nil {
++			a.built = a.Package.Target
++			a.Target = a.Package.Target
++			a.buildID = b.fileHash(a.Package.Target)
++			a.Package.Stale = false
++			a.Package.StaleReason = "GOROOT-resident package"
++			return nil
++		}
++		if b.ComputeStaleOnly {
++			a.Package.Stale = true
++			a.Package.StaleReason = "missing or invalid GOROOT-resident package"
++			return nil
++		}
++	}
++
+ 	if err := b.Mkdir(a.Objdir); err != nil {
+ 		return err
+ 	}
+@@ -1097,6 +1114,14 @@ func BuildInstallFunc(b *Builder, a *Action) (err error) {
+ 		return nil
+ 	}
+ 
++	if goRootPrecious && a.Package != nil {
++		p := a.Package
++		if p.Standard || p.Goroot {
++			err := fmt.Errorf("attempting to install package %s into read-only GOROOT", p.ImportPath)
++			return err
++		}
++	}
++
+ 	if err := b.Mkdir(a.Objdir); err != nil {
+ 		return err
+ 	}
+-- 
+2.14.1
+
diff --git a/meta/recipes-devtools/go/go-1.10/0008-cmd-internal-obj-arm64-fix-branch-too-far-with-TBZ-l.patch b/meta/recipes-devtools/go/go-1.10/0008-cmd-internal-obj-arm64-fix-branch-too-far-with-TBZ-l.patch
new file mode 100644
index 0000000000..1e754178d5
--- /dev/null
+++ b/meta/recipes-devtools/go/go-1.10/0008-cmd-internal-obj-arm64-fix-branch-too-far-with-TBZ-l.patch
@@ -0,0 +1,58 @@
+From 41b90ed7af10a071ccfeede6a429e0d80518436d Mon Sep 17 00:00:00 2001
+From: Cherry Zhang <cherryyz@google.com>
+Date: Sat, 17 Feb 2018 10:31:39 -0500
+Subject: [PATCH 8/9] cmd/internal/obj/arm64: fix branch-too-far with TBZ like
+ instructions
+
+The compiler now emits TBZ like instructions, but the assembler's
+too-far-branch patch code didn't include that case. Add it.
+
+Fixes #23889.
+
+Change-Id: Ib75f9250c660b9fb652835fbc83263a5d5073dc5
+---
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Backport
+
+ src/cmd/internal/obj/arm64/asm7.go     | 11 +++++++++--
+ src/cmd/internal/obj/arm64/asm_test.go |  1 +
+ 2 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/src/cmd/internal/obj/arm64/asm7.go b/src/cmd/internal/obj/arm64/asm7.go
+index ca81238c93..b1ee552489 100644
+--- a/src/cmd/internal/obj/arm64/asm7.go
++++ b/src/cmd/internal/obj/arm64/asm7.go
+@@ -696,9 +696,16 @@ func span7(ctxt *obj.Link, cursym *obj.LSym, newprog obj.ProgAlloc) {
+ 			o = c.oplook(p)
+ 
+ 			/* very large branches */
+-			if (o.type_ == 7 || o.type_ == 39) && p.Pcond != nil { // 7: BEQ and like, 39: CBZ and like
++			if (o.type_ == 7 || o.type_ == 39 || o.type_ == 40) && p.Pcond != nil { // 7: BEQ and like, 39: CBZ and like, 40: TBZ and like
+ 				otxt := p.Pcond.Pc - pc
+-				if otxt <= -(1<<18)+10 || otxt >= (1<<18)-10 {
++				var toofar bool
++				switch o.type_ {
++				case 7, 39: // branch instruction encodes 19 bits
++					toofar = otxt <= -(1<<20)+10 || otxt >= (1<<20)-10
++				case 40: // branch instruction encodes 14 bits
++					toofar = otxt <= -(1<<15)+10 || otxt >= (1<<15)-10
++				}
++				if toofar {
+ 					q := c.newprog()
+ 					q.Link = p.Link
+ 					p.Link = q
+diff --git a/src/cmd/internal/obj/arm64/asm_test.go b/src/cmd/internal/obj/arm64/asm_test.go
+index 369c48f510..3e0c9c13a6 100644
+--- a/src/cmd/internal/obj/arm64/asm_test.go
++++ b/src/cmd/internal/obj/arm64/asm_test.go
+@@ -52,6 +52,7 @@ func TestLarge(t *testing.T) {
+ // gen generates a very large program, with a very far conditional branch.
+ func gen(buf *bytes.Buffer) {
+ 	fmt.Fprintln(buf, "TEXT f(SB),0,$0-0")
++	fmt.Fprintln(buf, "TBZ $5, R0, label")
+ 	fmt.Fprintln(buf, "CBZ R0, label")
+ 	fmt.Fprintln(buf, "BEQ label")
+ 	for i := 0; i < 1<<19; i++ {
+-- 
+2.14.1
+
diff --git a/meta/recipes-devtools/go/go-1.10/0009-ld-replace-glibc-dynamic-linker-with-musl.patch b/meta/recipes-devtools/go/go-1.10/0009-ld-replace-glibc-dynamic-linker-with-musl.patch
new file mode 100644
index 0000000000..06b00b3cc2
--- /dev/null
+++ b/meta/recipes-devtools/go/go-1.10/0009-ld-replace-glibc-dynamic-linker-with-musl.patch
@@ -0,0 +1,130 @@
+From f575d85c4bd9b2903223d6c0dcc38a12775d582f Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+Date: Sun, 18 Feb 2018 08:24:05 -0800
+Subject: [PATCH 9/9] ld: replace glibc dynamic linker with musl
+
+Rework of patch by Khem Raj <raj.khem@gmail.com>
+for go 1.10.  Should be applied conditionally on
+musl being the system C library.
+
+Upstream-Status: Inappropriate [Real fix should be portable across libcs]
+
+Signed-off-by: Matt Madison <matt@madison.systems>
+---
+ src/cmd/link/internal/amd64/obj.go  | 2 +-
+ src/cmd/link/internal/arm/obj.go    | 2 +-
+ src/cmd/link/internal/arm64/obj.go  | 2 +-
+ src/cmd/link/internal/mips/obj.go   | 2 +-
+ src/cmd/link/internal/mips64/obj.go | 2 +-
+ src/cmd/link/internal/ppc64/obj.go  | 2 +-
+ src/cmd/link/internal/s390x/obj.go  | 2 +-
+ src/cmd/link/internal/x86/obj.go    | 2 +-
+ 8 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/src/cmd/link/internal/amd64/obj.go b/src/cmd/link/internal/amd64/obj.go
+index 87e809166a..f522a63034 100644
+--- a/src/cmd/link/internal/amd64/obj.go
++++ b/src/cmd/link/internal/amd64/obj.go
+@@ -62,7 +62,7 @@ func Init() (*sys.Arch, ld.Arch) {
+ 		PEreloc1:         pereloc1,
+ 		TLSIEtoLE:        tlsIEtoLE,
+ 
+-		Linuxdynld:     "/lib64/ld-linux-x86-64.so.2",
++		Linuxdynld:     "/lib64/ld-musl-x86-64.so.1",
+ 		Freebsddynld:   "/libexec/ld-elf.so.1",
+ 		Openbsddynld:   "/usr/libexec/ld.so",
+ 		Netbsddynld:    "/libexec/ld.elf_so",
+diff --git a/src/cmd/link/internal/arm/obj.go b/src/cmd/link/internal/arm/obj.go
+index da16f92345..fd14940ede 100644
+--- a/src/cmd/link/internal/arm/obj.go
++++ b/src/cmd/link/internal/arm/obj.go
+@@ -58,7 +58,7 @@ func Init() (*sys.Arch, ld.Arch) {
+ 		Gentext:          gentext,
+ 		Machoreloc1:      machoreloc1,
+ 
+-		Linuxdynld:     "/lib/ld-linux.so.3", // 2 for OABI, 3 for EABI
++		Linuxdynld:     "/lib/ld-musl-armhf.so.1",
+ 		Freebsddynld:   "/usr/libexec/ld-elf.so.1",
+ 		Openbsddynld:   "/usr/libexec/ld.so",
+ 		Netbsddynld:    "/libexec/ld.elf_so",
+diff --git a/src/cmd/link/internal/arm64/obj.go b/src/cmd/link/internal/arm64/obj.go
+index 6b386ad737..99863712cc 100644
+--- a/src/cmd/link/internal/arm64/obj.go
++++ b/src/cmd/link/internal/arm64/obj.go
+@@ -57,7 +57,7 @@ func Init() (*sys.Arch, ld.Arch) {
+ 		Gentext:          gentext,
+ 		Machoreloc1:      machoreloc1,
+ 
+-		Linuxdynld: "/lib/ld-linux-aarch64.so.1",
++		Linuxdynld: "/lib/ld-musl-aarch64.so.1",
+ 
+ 		Freebsddynld:   "XXX",
+ 		Openbsddynld:   "XXX",
+diff --git a/src/cmd/link/internal/mips/obj.go b/src/cmd/link/internal/mips/obj.go
+index c5d3451c39..fd85e6368d 100644
+--- a/src/cmd/link/internal/mips/obj.go
++++ b/src/cmd/link/internal/mips/obj.go
+@@ -60,7 +60,7 @@ func Init() (*sys.Arch, ld.Arch) {
+ 		Gentext:          gentext,
+ 		Machoreloc1:      machoreloc1,
+ 
+-		Linuxdynld: "/lib/ld.so.1",
++		Linuxdynld: "/lib/ld-musl-mipsle.so.1",
+ 
+ 		Freebsddynld:   "XXX",
+ 		Openbsddynld:   "XXX",
+diff --git a/src/cmd/link/internal/mips64/obj.go b/src/cmd/link/internal/mips64/obj.go
+index 83974e5b56..097224f6da 100644
+--- a/src/cmd/link/internal/mips64/obj.go
++++ b/src/cmd/link/internal/mips64/obj.go
+@@ -59,7 +59,7 @@ func Init() (*sys.Arch, ld.Arch) {
+ 		Gentext:          gentext,
+ 		Machoreloc1:      machoreloc1,
+ 
+-		Linuxdynld:     "/lib64/ld64.so.1",
++		Linuxdynld:     "/lib64/ld-musl-mips64le.so.1",
+ 		Freebsddynld:   "XXX",
+ 		Openbsddynld:   "XXX",
+ 		Netbsddynld:    "XXX",
+diff --git a/src/cmd/link/internal/ppc64/obj.go b/src/cmd/link/internal/ppc64/obj.go
+index 273d9b42cb..a503abe8ea 100644
+--- a/src/cmd/link/internal/ppc64/obj.go
++++ b/src/cmd/link/internal/ppc64/obj.go
+@@ -62,7 +62,7 @@ func Init() (*sys.Arch, ld.Arch) {
+ 		Machoreloc1:      machoreloc1,
+ 
+ 		// TODO(austin): ABI v1 uses /usr/lib/ld.so.1,
+-		Linuxdynld: "/lib64/ld64.so.1",
++		Linuxdynld: "/lib64/ld-musl-powerpc64le.so.1",
+ 
+ 		Freebsddynld:   "XXX",
+ 		Openbsddynld:   "XXX",
+diff --git a/src/cmd/link/internal/s390x/obj.go b/src/cmd/link/internal/s390x/obj.go
+index 9ac7eb8217..3825ff7abe 100644
+--- a/src/cmd/link/internal/s390x/obj.go
++++ b/src/cmd/link/internal/s390x/obj.go
+@@ -57,7 +57,7 @@ func Init() (*sys.Arch, ld.Arch) {
+ 		Gentext:          gentext,
+ 		Machoreloc1:      machoreloc1,
+ 
+-		Linuxdynld: "/lib64/ld64.so.1",
++		Linuxdynld: "/lib64/ld-musl-s390x.so.1",
+ 
+ 		// not relevant for s390x
+ 		Freebsddynld:   "XXX",
+diff --git a/src/cmd/link/internal/x86/obj.go b/src/cmd/link/internal/x86/obj.go
+index 6a744dc04e..d81f392549 100644
+--- a/src/cmd/link/internal/x86/obj.go
++++ b/src/cmd/link/internal/x86/obj.go
+@@ -58,7 +58,7 @@ func Init() (*sys.Arch, ld.Arch) {
+ 		Machoreloc1:      machoreloc1,
+ 		PEreloc1:         pereloc1,
+ 
+-		Linuxdynld:   "/lib/ld-linux.so.2",
++		Linuxdynld:   "/lib/ld-musl-i386.so.1",
+ 		Freebsddynld: "/usr/libexec/ld-elf.so.1",
+ 		Openbsddynld: "/usr/libexec/ld.so",
+ 		Netbsddynld:  "/usr/libexec/ld.elf_so",
+-- 
+2.14.1
+
diff --git a/meta/recipes-devtools/go/go-common.inc b/meta/recipes-devtools/go/go-common.inc
index 37138b51ed..611775b2cc 100644
--- a/meta/recipes-devtools/go/go-common.inc
+++ b/meta/recipes-devtools/go/go-common.inc
@@ -22,6 +22,8 @@ UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.src\.tar"
 INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
 SSTATE_SCAN_CMD = "true"
 
+export GOROOT_OVERRIDE = "1"
+
 do_compile_prepend() {
 	BUILD_CC=${BUILD_CC}
 }
diff --git a/meta/recipes-devtools/go/go-cross-canadian.inc b/meta/recipes-devtools/go/go-cross-canadian.inc
index 8afda6b2ce..e22914e7aa 100644
--- a/meta/recipes-devtools/go/go-cross-canadian.inc
+++ b/meta/recipes-devtools/go/go-cross-canadian.inc
@@ -7,34 +7,33 @@ PN = "go-cross-canadian-${TRANSLATED_TARGET_ARCH}"
 
 export GOHOSTOS = "${BUILD_GOOS}"
 export GOHOSTARCH = "${BUILD_GOARCH}"
-export GOHOSTOS_CROSS = "${HOST_GOOS}"
-export GOHOSTARCH_CROSS = "${HOST_GOARCH}"
 export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
 export GOTOOLDIR_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/${HOST_SYS}/go/pkg/tool/${BUILD_GOTUPLE}"
 export GOROOT_FINAL = "${libdir}/go"
 export CGO_ENABLED = "1"
-export CC_FOR_TARGET = "${TARGET_PREFIX}gcc"
-export CXX_FOR_TARGET = "${TARGET_PREFIX}g++"
-CC = "${HOST_PREFIX}gcc"
-export CGO_CFLAGS = "--sysroot=${STAGING_DIR_TARGET} ${HOST_CC_ARCH} ${CFLAGS}"
-export CGO_LDFLAGS = "--sysroot=${STAGING_DIR_TARGET} ${HOST_CC_ARCH} ${LDFLAGS}"
-export GO_LDFLAGS = '-linkmode external -extld ${HOST_PREFIX}gcc -extldflags "--sysroot=${STAGING_DIR_TARGET} ${HOST_CC_ARCH} ${LDFLAGS}"'
+export GOCACHE = "off"
+export GOTMPDIR ?= "${WORKDIR}/go-tmp"
+GOTMPDIR[vardepvalue] = ""
+export CGO_CFLAGS = "${CFLAGS}"
+export CGO_LDFLAGS = "${LDFLAGS}"
+export GO_LDFLAGS = '-linkmode external -extld ${HOST_PREFIX}gcc -extldflags "--sysroot=${STAGING_DIR_HOST} ${HOST_CC_ARCH} ${LDFLAGS}"'
 
 do_configure[noexec] = "1"
 
 do_compile() {
-	export GOBIN="${B}/bin"
-	rm -rf ${GOBIN} ${B}/pkg
-	mkdir ${GOBIN}
+	export CC_FOR_${HOST_GOOS}_${HOST_GOARCH}="${HOST_PREFIX}gcc --sysroot=${STAGING_DIR_HOST}${SDKPATHNATIVE}"
+	export CXX_FOR_${HOST_GOOS}_${HOST_GOARCH}="${HOST_PREFIX}gxx --sysroot=${STAGING_DIR_HOST}${SDKPATHNATIVE}"
 	cd src
 	./make.bash --host-only --no-banner
 	cd ${B}
 }
+do_compile[dirs] =+ "${GOTMPDIR} ${B}/bin ${B}/pkg"
+do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin ${B}/pkg"
 
 
 make_wrapper() {
-    rm -f ${D}${bindir}/$2
-    cat <<END >${D}${bindir}/$2
+	rm -f ${D}${bindir}/$2
+	cat <<END >${D}${bindir}/$2
 #!/bin/sh
 here=\`dirname \$0\`
 native_goroot=\`readlink -f \$here/../../lib/${TARGET_SYS}/go\`
@@ -46,7 +45,7 @@ export GOTOOLDIR="\$native_goroot/pkg/tool/${HOST_GOTUPLE}"
 test -n "\$GOROOT" || export GOROOT="\$OECORE_TARGET_SYSROOT/${target_libdir}/go"
 \$here/../../lib/${TARGET_SYS}/go/bin/$1 "\$@"
 END
-    chmod +x ${D}${bindir}/$2
+	chmod +x ${D}${bindir}/$2
 }
 
 do_install() {
diff --git a/meta/recipes-devtools/go/go-cross-canadian_1.10.bb b/meta/recipes-devtools/go/go-cross-canadian_1.10.bb
new file mode 100644
index 0000000000..7ac9449e47
--- /dev/null
+++ b/meta/recipes-devtools/go/go-cross-canadian_1.10.bb
@@ -0,0 +1,2 @@
+require go-cross-canadian.inc
+require go-${PV}.inc
diff --git a/meta/recipes-devtools/go/go-cross-canadian_1.9.bb b/meta/recipes-devtools/go/go-cross-canadian_1.9.bb
index 7ac9449e47..0306fdf684 100644
--- a/meta/recipes-devtools/go/go-cross-canadian_1.9.bb
+++ b/meta/recipes-devtools/go/go-cross-canadian_1.9.bb
@@ -1,2 +1,12 @@
 require go-cross-canadian.inc
 require go-${PV}.inc
+
+export GOHOSTOS_CROSS = "${HOST_GOOS}"
+export GOHOSTARCH_CROSS = "${HOST_GOARCH}"
+export CC_FOR_TARGET = "${HOST_PREFIX}gcc --sysroot=${STAGING_DIR_HOST}${SDKPATHNATIVE}"
+export CXX_FOR_TARGET = "${HOST_PREFIX}g++ --sysroot=${STAGING_DIR_HOST}${SDKPATHNATIVE}"
+
+do_compile_prepend() {
+	export GOBIN="${B}/bin"
+	export TMPDIR="$GOTMPDIR"
+}
diff --git a/meta/recipes-devtools/go/go-cross.inc b/meta/recipes-devtools/go/go-cross.inc
index 3ac7211bc3..fe92651581 100644
--- a/meta/recipes-devtools/go/go-cross.inc
+++ b/meta/recipes-devtools/go/go-cross.inc
@@ -1,7 +1,7 @@
 inherit cross
 
 PROVIDES = "virtual/${TARGET_PREFIX}go"
-DEPENDS += "go-native"
+DEPENDS = "go-native"
 
 PN = "go-cross-${TARGET_ARCH}"
 
@@ -13,26 +13,27 @@ export GOARM = "${TARGET_GOARM}"
 export GO386 = "${TARGET_GO386}"
 export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
 export GOROOT_FINAL = "${libdir}/go"
+export GOCACHE = "off"
+export GOTMPDIR ?= "${WORKDIR}/go-tmp"
+GOTMPDIR[vardepvalue] = ""
 export CGO_ENABLED = "1"
-export CC_FOR_TARGET="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
-export CXX_FOR_TARGET="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
 CC = "${@d.getVar('BUILD_CC').strip()}"
 
 do_configure[noexec] = "1"
 
 do_compile() {
-    export GOBIN="${B}/bin"
-    rm -rf ${GOBIN} ${B}/pkg
-    mkdir ${GOBIN}
-    cd src
-    ./make.bash --host-only
-    cd ${B}
+	export CC_FOR_${GOOS}_${GOARCH}="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
+	export CXX_FOR_${GOOS}_${GOARCh}="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
+	cd src
+	./make.bash --host-only --no-banner
+	cd ${B}
 }
-
+do_compile[dirs] =+ "${GOTMPDIR} ${B}/bin ${B}/pkg"
+do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin ${B}/pkg"
 
 make_wrapper() {
-    rm -f ${D}${bindir}/$2
-    cat <<END >${D}${bindir}/$2
+	rm -f ${D}${bindir}/$2
+	cat <<END >${D}${bindir}/$2
 #!/bin/bash
 here=\`dirname \$0\`
 export GOARCH="${TARGET_GOARCH}"
@@ -41,22 +42,22 @@ export GOARM="\${GOARM:-${TARGET_GOARM}}"
 export GO386="\${GO386:-${TARGET_GO386}}"
 \$here/../../lib/${CROSS_TARGET_SYS_DIR}/go/bin/$1 "\$@"
 END
-    chmod +x ${D}${bindir}/$2
+	chmod +x ${D}${bindir}/$2
 }
 
 do_install() {
-    install -d ${D}${libdir}/go
-    cp --preserve=mode,timestamps -R ${B}/pkg ${D}${libdir}/go/
-    install -d ${D}${libdir}/go/src
-    (cd ${S}/src; for d in *; do \
-        [ ! -d $d ] || cp --preserve=mode,timestamps -R ${S}/src/$d ${D}${libdir}/go/src/; \
-    done)
-    rm -rf ${D}${libdir}/go/src/runtime/pprof/testdata
-    install -d ${D}${bindir} ${D}${libdir}/go/bin
-    for f in ${B}/bin/*
-    do
-        base=`basename $f`
-        install -m755 $f ${D}${libdir}/go/bin
-        make_wrapper $base ${TARGET_PREFIX}$base
-    done
+	install -d ${D}${libdir}/go
+	cp --preserve=mode,timestamps -R ${B}/pkg ${D}${libdir}/go/
+	install -d ${D}${libdir}/go/src
+	(cd ${S}/src; for d in *; do \
+		[ ! -d $d ] || cp --preserve=mode,timestamps -R ${S}/src/$d ${D}${libdir}/go/src/; \
+	done)
+	find ${D}${libdir}/go/src -depth -type d -name testdata -exec rm -rf {} \;
+	install -d ${D}${bindir} ${D}${libdir}/go/bin
+	for f in ${B}/bin/*
+	do
+		base=`basename $f`
+		install -m755 $f ${D}${libdir}/go/bin
+		make_wrapper $base ${TARGET_PREFIX}$base
+	done
 }
diff --git a/meta/recipes-devtools/go/go-cross_1.10.bb b/meta/recipes-devtools/go/go-cross_1.10.bb
new file mode 100644
index 0000000000..80b5a03f6c
--- /dev/null
+++ b/meta/recipes-devtools/go/go-cross_1.10.bb
@@ -0,0 +1,2 @@
+require go-cross.inc
+require go-${PV}.inc
diff --git a/meta/recipes-devtools/go/go-cross_1.9.bb b/meta/recipes-devtools/go/go-cross_1.9.bb
index 80b5a03f6c..4739c7d5c4 100644
--- a/meta/recipes-devtools/go/go-cross_1.9.bb
+++ b/meta/recipes-devtools/go/go-cross_1.9.bb
@@ -1,2 +1,10 @@
 require go-cross.inc
 require go-${PV}.inc
+
+export CC_FOR_TARGET = "${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
+export CXX_FOR_TARGET = "${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
+
+do_compile_prepend() {
+	export GOBIN="${B}/bin"
+	export TMPDIR="$GOTMPDIR"
+}
diff --git a/meta/recipes-devtools/go/go-crosssdk.inc b/meta/recipes-devtools/go/go-crosssdk.inc
index f67e4b92a0..05ca62eba8 100644
--- a/meta/recipes-devtools/go/go-crosssdk.inc
+++ b/meta/recipes-devtools/go/go-crosssdk.inc
@@ -11,21 +11,21 @@ export GOARCH = "${TARGET_GOARCH}"
 export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
 export GOROOT_FINAL = "${libdir}/go"
 export CGO_ENABLED = "1"
-export CC_FOR_TARGET="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}${SDKPATHNATIVE}"
-export CXX_FOR_TARGET="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}${SDKPATHNATIVE}"
-export GO_INSTALL = "cmd"
-CC = "${@d.getVar('BUILD_CC').strip()}"
+export GOCACHE = "off"
+export GOTMPDIR ?= "${WORKDIR}/go-tmp"
+GOTMPDIR[vardepvalue] = ""
 
 do_configure[noexec] = "1"
 
 do_compile() {
-	export GOBIN="${B}/bin"
-	rm -rf ${GOBIN} ${B}/pkg
-	mkdir ${GOBIN}
+	export CC_FOR_${TARGET_GOOS}_${TARGET_GOARCH}="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}${SDKPATHNATIVE}"
+	export CXX_FOR_${TARGET_GOOS}_${TARGET_GOARCH}="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}${SDKPATHNATIVE}"
 	cd src
-	./make.bash --host-only
+	./make.bash --host-only --no-banner
 	cd ${B}
 }
+do_compile[dirs] =+ "${GOTMPDIR} ${B}/bin ${B}/pkg"
+do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin ${B}/pkg"
 
 make_wrapper() {
     rm -f ${D}${bindir}/$2
diff --git a/meta/recipes-devtools/go/go-crosssdk_1.10.bb b/meta/recipes-devtools/go/go-crosssdk_1.10.bb
new file mode 100644
index 0000000000..1857c8a577
--- /dev/null
+++ b/meta/recipes-devtools/go/go-crosssdk_1.10.bb
@@ -0,0 +1,2 @@
+require go-crosssdk.inc
+require go-${PV}.inc
diff --git a/meta/recipes-devtools/go/go-crosssdk_1.9.bb b/meta/recipes-devtools/go/go-crosssdk_1.9.bb
index 1857c8a577..3ac629bd41 100644
--- a/meta/recipes-devtools/go/go-crosssdk_1.9.bb
+++ b/meta/recipes-devtools/go/go-crosssdk_1.9.bb
@@ -1,2 +1,11 @@
 require go-crosssdk.inc
 require go-${PV}.inc
+
+export CC_FOR_TARGET = "${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
+export CXX_FOR_TARGET = "${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
+export GO_INSTALL = "cmd"
+
+do_compile_prepend() {
+	export GOBIN="${B}/bin"
+	export TMPDIR="$GOTMPDIR"
+}
diff --git a/meta/recipes-devtools/go/go-native.inc b/meta/recipes-devtools/go/go-native.inc
index 95db1c2b7c..35561768df 100644
--- a/meta/recipes-devtools/go/go-native.inc
+++ b/meta/recipes-devtools/go/go-native.inc
@@ -4,34 +4,34 @@ nonstaging_libdir := "${libdir}"
 
 inherit native
 
-SRC_URI_append = " http://golang.org/dl/go1.4.3.src.tar.gz;name=bootstrap;subdir=go1.4"
-SRC_URI[bootstrap.md5sum] = "dfb604511115dd402a77a553a5923a04"
-SRC_URI[bootstrap.sha256sum] = "9947fc705b0b841b5938c48b22dc33e9647ec0752bae66e50278df4f23f64959"
+SRC_URI_append = " https://dl.google.com/go/go1.4-bootstrap-20171003.tar.gz;name=bootstrap;subdir=go1.4"
+SRC_URI[bootstrap.md5sum] = "dbf727a4b0e365bf88d97cbfde590016"
+SRC_URI[bootstrap.sha256sum] = "f4ff5b5eb3a3cae1c993723f3eab519c5bae18866b5e5f96fe1102f0cb5c3e52"
 
 export GOOS = "${BUILD_GOOS}"
 export GOARCH = "${BUILD_GOARCH}"
+export GOTMPDIR ?= "${WORKDIR}/go-tmp"
+GOTMPDIR[vardepvalue] = ""
 CC = "${@d.getVar('BUILD_CC').strip()}"
 
 export CGO_ENABLED = "1"
+GOMAKEARGS ?= "--no-banner"
 
 do_configure() {
-    cd ${WORKDIR}/go1.4/go/src
-    CGO_ENABLED=0 GOROOT=${WORKDIR}/go1.4/go ./make.bash
+	cd ${WORKDIR}/go1.4/go/src
+	CGO_ENABLED=0 GOROOT=${WORKDIR}/go1.4/go ./make.bash
 }
 
 do_compile() {
-	export GOBIN="${B}/bin"
 	export GOROOT_FINAL="${nonstaging_libdir}/go"
 	export GOROOT_BOOTSTRAP="${WORKDIR}/go1.4/go"
-	rm -rf ${GOBIN}
-	mkdir ${GOBIN}
-
-	export TMPDIR=${WORKDIR}/build-tmp
-	mkdir -p ${WORKDIR}/build-tmp
 
 	cd src
-	./make.bash --host-only
+	./make.bash ${GOMAKEARGS}
+	cd ${B}
 }
+do_compile[dirs] =+ "${GOTMPDIR} ${B}/bin"
+do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin"
 
 make_wrapper() {
 	rm -f ${D}${bindir}/$2$3
@@ -51,7 +51,7 @@ do_install() {
 	(cd ${S}/src; for d in *; do \
 		[ -d $d ] && cp -a ${S}/src/$d ${D}${libdir}/go/src/; \
 	done)
-	rm -rf ${D}${libdir}/go/src/runtime/pprof/testdata
+	find ${D}${libdir}/go/src -depth -type d -name testdata -exec rm -rf {} \;
 	install -d ${D}${bindir} ${D}${libdir}/go/bin
 	for f in ${B}/bin/*
 	do
diff --git a/meta/recipes-devtools/go/go-native_1.10.bb b/meta/recipes-devtools/go/go-native_1.10.bb
new file mode 100644
index 0000000000..bbf3c0dd73
--- /dev/null
+++ b/meta/recipes-devtools/go/go-native_1.10.bb
@@ -0,0 +1,2 @@
+require ${PN}.inc
+require go-${PV}.inc
diff --git a/meta/recipes-devtools/go/go-native_1.9.bb b/meta/recipes-devtools/go/go-native_1.9.bb
index bbf3c0dd73..8621e1df32 100644
--- a/meta/recipes-devtools/go/go-native_1.9.bb
+++ b/meta/recipes-devtools/go/go-native_1.9.bb
@@ -1,2 +1,4 @@
 require ${PN}.inc
 require go-${PV}.inc
+
+GOMAKEARGS = "--host-only --no-banner"
diff --git a/meta/recipes-devtools/go/go-runtime.inc b/meta/recipes-devtools/go/go-runtime.inc
index 29ae86e4ee..7a3b415b3f 100644
--- a/meta/recipes-devtools/go/go-runtime.inc
+++ b/meta/recipes-devtools/go/go-runtime.inc
@@ -10,11 +10,18 @@ export GOARM = "${TARGET_GOARM}"
 export GO386 = "${TARGET_GO386}"
 export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
 export GOROOT_FINAL = "${libdir}/go"
-export GO_TARGET_INSTALL = "std"
 export CGO_ENABLED = "1"
-export CC_FOR_TARGET="${CC}"
-export CXX_FOR_TARGET="${CXX}"
-export GOROOT_OVERRIDE = "1"
+export CGO_CFLAGS = "${CFLAGS}"
+export CGO_CPPFLAGS = "${CPPFLAGS}"
+export CGO_CXXFLAGS = "${CXXFLAGS}"
+export CGO_LDFLAGS = "${LDFLAGS}"
+export GOCACHE = "off"
+export GOTMPDIR ?= "${WORKDIR}/go-tmp"
+GOTMPDIR[vardepvalue] = ""
+GO_EXTLDFLAGS ?= "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${LDFLAGS}"
+GO_LINKMODE ?= ""
+GO_LINKMODE_class-nativesdk = "--linkmode=external"
+GO_LDFLAGS ?= '-ldflags="${GO_LINKMODE} -extldflags '${GO_EXTLDFLAGS}'"'
 
 do_configure() {
 	:
@@ -25,21 +32,20 @@ do_configure_libc-musl() {
 }
 
 do_compile() {
-	export GOBIN="${B}/bin"
-	export CC="${@d.getVar('BUILD_CC').strip()}"
-	rm -rf ${GOBIN} ${B}/pkg
-	mkdir ${GOBIN}
+	export CC_FOR_${TARGET_GOOS}_${TARGET_GOARCH}="${CC}"
+	export CXX_FOR_${TARGET_GOOS}_${TARGET_GOARCH}="${CXX}"
+
 	cd src
-	./make.bash --host-only
-	cp ${B}/pkg/tool/${BUILD_GOTUPLE}/go_bootstrap ${B}
-	rm -rf ${B}/pkg/${TARGET_GOTUPLE}
-	./make.bash --target-only
+	./make.bash --target-only --no-banner std
 	if [ -n "${GO_DYNLINK}" ]; then
-		cp ${B}/go_bootstrap ${B}/pkg/tool/${BUILD_GOTUPLE}
-		GO_FLAGS="-buildmode=shared" GO_LDFLAGS="-extldflags \"${LDFLAGS}\"" ./make.bash --target-only
+		export GOTOOLDIR="${B}/pkg/tool/native_native"
+		CC="$CC_FOR_${TARGET_GOOS}_${TARGET_GOARCH}" GOARCH="${TARGET_GOARCH}" GOOS="${TARGET_GOOS}" GOROOT=${B} \
+			$GOTOOLDIR/go_bootstrap install -linkshared -buildmode=shared ${GO_LDFLAGS} std
 	fi
 	cd ${B}
 }
+do_compile[dirs] =+ "${GOTMPDIR} ${B}/bin ${B}/pkg"
+do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin ${B}/pkg"
 
 do_install() {
 	install -d ${D}${libdir}/go/src
@@ -54,20 +60,10 @@ do_install() {
 	find src -mindepth 1 -maxdepth 1 -type d | while read srcdir; do
 		cp --preserve=mode,timestamps -R $srcdir ${D}${libdir}/go/src/
 	done
+	find ${D}${libdir}/go/src -depth -type d -name testdata -exec rm -rf {} \;
 	rm -f ${D}${libdir}/go/src/cmd/dist/dist
 }
 
-# Remove test binaries that cannot be relocated
-do_install_append_class-nativesdk() {
-	rm -rf ${D}${libdir}/go/src/runtime/pprof/testdata
-}
-
-# These testdata directories aren't needed for builds and contain binaries
-# that can cause errors in sysroot_strip(), so just remove them.
-sysroot_stage_all_append() {
-	find ${SYSROOT_DESTDIR}${libdir}/go/src -depth -type d -name 'testdata' -exec rm -rf {} \;
-}
-
 ALLOW_EMPTY_${PN} = "1"
 FILES_${PN} = "${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*${SOLIBSDEV}"
 FILES_${PN}-dev = "${libdir}/go/src ${libdir}/go/pkg/include \
@@ -78,8 +74,6 @@ FILES_${PN}-dev = "${libdir}/go/src ${libdir}/go/pkg/include \
                    ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*.shlibname \
                    ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*/*.shlibname \
                    ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*/*/*.shlibname \
-"
-FILES_${PN}-staticdev = "${libdir}/go/pkg/${TARGET_GOTUPLE} \
                    ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*.a \
                    ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*.a \
                    ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*.a \
@@ -88,11 +82,15 @@ FILES_${PN}-staticdev = "${libdir}/go/pkg/${TARGET_GOTUPLE} \
                    ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*/*.a \
                    ${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*/*/*.a \
 "
-# The testdata directories in the source tree include some binaries for various
-# architectures, scripts, and .a files
-INSANE_SKIP_${PN}-dev = "staticdev ldflags file-rdeps arch"
+FILES_${PN}-staticdev = "${libdir}/go/pkg/${TARGET_GOTUPLE}"
+
+# Go sources include some scripts and pre-built binaries for
+# multiple architectures.  The static .a files for dynamically-linked
+# runtime are also required in -dev.
+INSANE_SKIP_${PN}-dev = "staticdev file-rdeps arch"
 
 INHIBIT_PACKAGE_STRIP = "1"
 INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+INHIBIT_SYSROOT_STRIP = "1"
 
 BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-devtools/go/go-runtime_1.10.bb b/meta/recipes-devtools/go/go-runtime_1.10.bb
new file mode 100644
index 0000000000..43b68b4e46
--- /dev/null
+++ b/meta/recipes-devtools/go/go-runtime_1.10.bb
@@ -0,0 +1,2 @@
+require go-${PV}.inc
+require go-runtime.inc
diff --git a/meta/recipes-devtools/go/go-runtime_1.9.bb b/meta/recipes-devtools/go/go-runtime_1.9.bb
index 43b68b4e46..a99cc30f63 100644
--- a/meta/recipes-devtools/go/go-runtime_1.9.bb
+++ b/meta/recipes-devtools/go/go-runtime_1.9.bb
@@ -1,2 +1,23 @@
 require go-${PV}.inc
 require go-runtime.inc
+
+export GO_TARGET_INSTALL = "std"
+export CC_FOR_TARGET = "${CC}"
+export CXX_FOR_TARGET = "${CXX}"
+
+do_compile() {
+	export GOBIN="${B}/bin"
+	export TMPDIR="$GOTMPDIR"
+	export CC=$BUILD_CC
+
+	cd src
+	./make.bash --host-only
+	cp ${B}/pkg/tool/${BUILD_GOTUPLE}/go_bootstrap ${B}
+	rm -rf ${B}/pkg/${TARGET_GOTUPLE}
+	./make.bash --target-only
+	if [ -n "${GO_DYNLINK}" ]; then
+		cp ${B}/go_bootstrap ${B}/pkg/tool/${BUILD_GOTUPLE}
+		GO_FLAGS="-buildmode=shared" GO_LDFLAGS="-extldflags \"${LDFLAGS}\"" ./make.bash --target-only
+	fi
+	cd ${B}
+}
diff --git a/meta/recipes-devtools/go/go-target.inc b/meta/recipes-devtools/go/go-target.inc
index cac5d78227..a53a314c78 100644
--- a/meta/recipes-devtools/go/go-target.inc
+++ b/meta/recipes-devtools/go/go-target.inc
@@ -11,10 +11,9 @@ export GO386 = "${TARGET_GO386}"
 export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
 export GOROOT_FINAL = "${libdir}/go"
 export CGO_ENABLED = "1"
-export CC_FOR_TARGET = "${CC}"
-export CXX_FOR_TARGET = "${CXX}"
-export GO_TARGET_INSTALL = "cmd"
-export GO_FLAGS = "-a"
+export GOCACHE = "off"
+export GOTMPDIR ?= "${WORKDIR}/go-tmp"
+GOTMPDIR[vardepvalue] = ""
 GO_LDFLAGS = ""
 GO_LDFLAGS_class-nativesdk = "-linkmode external"
 export GO_LDFLAGS
@@ -25,24 +24,22 @@ SECURITY_LDFLAGS = ""
 do_configure[noexec] = "1"
 
 do_compile() {
-	export GOBIN="${B}/bin"
-	export CC="${@d.getVar('BUILD_CC').strip()}"
-	rm -rf ${GOBIN} ${B}/pkg
-	mkdir ${GOBIN}
-
-	export TMPDIR=${WORKDIR}/build-tmp
-	mkdir -p ${WORKDIR}/build-tmp
+	export CC_FOR_${TARGET_GOOS}_${TARGET_GOARCH}="${CC}"
+	export CXX_FOR_${TARGET_GOOS}_${TARGET_GOARCH}="${CXX}"
 
 	cd src
-	./make.bash
+	./make.bash --target-only --no-banner
 	cd ${B}
 }
+do_compile[dirs] =+ "${GOTMPDIR} ${B}/bin ${B}/pkg"
+do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin ${B}/pkg"
 
 do_install() {
 	install -d ${D}${libdir}/go/pkg/tool
 	cp --preserve=mode,timestamps -R ${B}/pkg/tool/${TARGET_GOTUPLE} ${D}${libdir}/go/pkg/tool/
 	install -d ${D}${libdir}/go/src
 	cp --preserve=mode,timestamps -R ${S}/src/cmd ${D}${libdir}/go/src/
+	find ${D}${libdir}/go/src -depth -type d -name testdata -exec rm -rf {} \;
 	install -d ${D}${libdir}/go/bin
 	install -d ${D}${bindir}
 	for f in ${B}/${GO_BUILD_BINDIR}/*; do
diff --git a/meta/recipes-devtools/go/go_1.10.bb b/meta/recipes-devtools/go/go_1.10.bb
new file mode 100644
index 0000000000..c67e2cb050
--- /dev/null
+++ b/meta/recipes-devtools/go/go_1.10.bb
@@ -0,0 +1,2 @@
+require go-${PV}.inc
+require go-target.inc
diff --git a/meta/recipes-devtools/go/go_1.9.bb b/meta/recipes-devtools/go/go_1.9.bb
index c67e2cb050..ec5a314e7d 100644
--- a/meta/recipes-devtools/go/go_1.9.bb
+++ b/meta/recipes-devtools/go/go_1.9.bb
@@ -1,2 +1,17 @@
 require go-${PV}.inc
 require go-target.inc
+
+export GO_TARGET_INSTALL = "cmd"
+export GO_FLAGS = "-a"
+export CC_FOR_TARGET = "${CC}"
+export CXX_FOR_TARGET = "${CXX}"
+
+do_compile() {
+	export GOBIN="${B}/bin"
+	export TMPDIR="$GOTMPDIR"
+	export CC=$BUILD_CC
+
+	cd src
+	./make.bash
+	cd ${B}
+}
-- 
2.14.1



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v5 02/13] go: set GOMIPS envrionment variable
  2018-03-04 21:09 [PATCH v5 00/13] go1.10 update and misc improvements Matt Madison
  2018-03-04 21:09 ` [PATCH v5 01/13] go: update go 1.9 -> go 1.10 Matt Madison
@ 2018-03-04 21:09 ` Matt Madison
  2018-03-04 21:09 ` [PATCH v5 03/13] go.bbclass: rename GO_TMPDIR -> GOTMPDIR Matt Madison
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 22+ messages in thread
From: Matt Madison @ 2018-03-04 21:09 UTC (permalink / raw)
  To: openembedded-core

Go 1.10 adds support for selecting hard/soft float
object code through the GOMIPS environment variable.

Signed-off-by: Matt Madison <matt@madison.systems>
---
 meta/classes/goarch.bbclass                    | 11 +++++++++++
 meta/recipes-devtools/go/go-cross-canadian.inc |  1 +
 meta/recipes-devtools/go/go-cross.inc          |  2 ++
 meta/recipes-devtools/go/go-runtime.inc        |  1 +
 meta/recipes-devtools/go/go-target.inc         |  1 +
 5 files changed, 16 insertions(+)

diff --git a/meta/classes/goarch.bbclass b/meta/classes/goarch.bbclass
index 922c0cc8f3..1021b94d4c 100644
--- a/meta/classes/goarch.bbclass
+++ b/meta/classes/goarch.bbclass
@@ -5,11 +5,13 @@ HOST_GOOS = "${@go_map_os(d.getVar('HOST_OS'), d)}"
 HOST_GOARCH = "${@go_map_arch(d.getVar('HOST_ARCH'), d)}"
 HOST_GOARM = "${@go_map_arm(d.getVar('HOST_ARCH'), d.getVar('TUNE_FEATURES'), d)}"
 HOST_GO386 = "${@go_map_386(d.getVar('HOST_ARCH'), d.getVar('TUNE_FEATURES'), d)}"
+HOST_GOMIPS = "${@go_map_mips(d.getVar('HOST_ARCH'), d.getVar('TUNE_FEATURES'), d)}"
 HOST_GOTUPLE = "${HOST_GOOS}_${HOST_GOARCH}"
 TARGET_GOOS = "${@go_map_os(d.getVar('TARGET_OS'), d)}"
 TARGET_GOARCH = "${@go_map_arch(d.getVar('TARGET_ARCH'), d)}"
 TARGET_GOARM = "${@go_map_arm(d.getVar('TARGET_ARCH'), d.getVar('TUNE_FEATURES'), d)}"
 TARGET_GO386 = "${@go_map_386(d.getVar('TARGET_ARCH'), d.getVar('TUNE_FEATURES'), d)}"
+TARGET_GOMIPS = "${@go_map_mips(d.getVar('TARGET_ARCH'), d.getVar('TUNE_FEATURES'), d)}"
 TARGET_GOTUPLE = "${TARGET_GOOS}_${TARGET_GOARCH}"
 GO_BUILD_BINDIR = "${@['bin/${HOST_GOTUPLE}','bin'][d.getVar('BUILD_GOTUPLE') == d.getVar('HOST_GOTUPLE')]}"
 
@@ -78,6 +80,15 @@ def go_map_386(a, f, d):
             return '387'
     return ''
 
+def go_map_mips(a, f, d):
+    import re
+    if a == 'mips' or a == 'mipsel':
+        if 'fpu-hard' in f:
+            return 'hardfloat'
+        else:
+            return 'softfloat'
+    return ''
+
 def go_map_os(o, d):
     if o.startswith('linux'):
         return 'linux'
diff --git a/meta/recipes-devtools/go/go-cross-canadian.inc b/meta/recipes-devtools/go/go-cross-canadian.inc
index e22914e7aa..4a43d831fa 100644
--- a/meta/recipes-devtools/go/go-cross-canadian.inc
+++ b/meta/recipes-devtools/go/go-cross-canadian.inc
@@ -41,6 +41,7 @@ export GOARCH="${TARGET_GOARCH}"
 export GOOS="${TARGET_GOOS}"
 test -n "\$GOARM" || export GOARM="${TARGET_GOARM}"
 test -n "\$GO386" || export GO386="${TARGET_GO386}"
+test -n "\$GOMIPS" || export GOMIPS="${TARGET_GOMIPS}"
 export GOTOOLDIR="\$native_goroot/pkg/tool/${HOST_GOTUPLE}"
 test -n "\$GOROOT" || export GOROOT="\$OECORE_TARGET_SYSROOT/${target_libdir}/go"
 \$here/../../lib/${TARGET_SYS}/go/bin/$1 "\$@"
diff --git a/meta/recipes-devtools/go/go-cross.inc b/meta/recipes-devtools/go/go-cross.inc
index fe92651581..289ae77104 100644
--- a/meta/recipes-devtools/go/go-cross.inc
+++ b/meta/recipes-devtools/go/go-cross.inc
@@ -11,6 +11,7 @@ export GOOS = "${TARGET_GOOS}"
 export GOARCH = "${TARGET_GOARCH}"
 export GOARM = "${TARGET_GOARM}"
 export GO386 = "${TARGET_GO386}"
+export GOMIPS = "${TARGET_GOMIPS}"
 export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
 export GOROOT_FINAL = "${libdir}/go"
 export GOCACHE = "off"
@@ -40,6 +41,7 @@ export GOARCH="${TARGET_GOARCH}"
 export GOOS="${TARGET_GOOS}"
 export GOARM="\${GOARM:-${TARGET_GOARM}}"
 export GO386="\${GO386:-${TARGET_GO386}}"
+export GOMIPS="\${GOMIPS:-${TARGET_GOMIPS}}"
 \$here/../../lib/${CROSS_TARGET_SYS_DIR}/go/bin/$1 "\$@"
 END
 	chmod +x ${D}${bindir}/$2
diff --git a/meta/recipes-devtools/go/go-runtime.inc b/meta/recipes-devtools/go/go-runtime.inc
index 7a3b415b3f..0fe4566360 100644
--- a/meta/recipes-devtools/go/go-runtime.inc
+++ b/meta/recipes-devtools/go/go-runtime.inc
@@ -8,6 +8,7 @@ export GOOS = "${TARGET_GOOS}"
 export GOARCH = "${TARGET_GOARCH}"
 export GOARM = "${TARGET_GOARM}"
 export GO386 = "${TARGET_GO386}"
+export GOMIPS = "${TARGET_GOMIPS}"
 export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
 export GOROOT_FINAL = "${libdir}/go"
 export CGO_ENABLED = "1"
diff --git a/meta/recipes-devtools/go/go-target.inc b/meta/recipes-devtools/go/go-target.inc
index a53a314c78..141a456cca 100644
--- a/meta/recipes-devtools/go/go-target.inc
+++ b/meta/recipes-devtools/go/go-target.inc
@@ -8,6 +8,7 @@ export GOOS = "${TARGET_GOOS}"
 export GOARCH = "${TARGET_GOARCH}"
 export GOARM = "${TARGET_GOARM}"
 export GO386 = "${TARGET_GO386}"
+export GOMIPS = "${TARGET_GOMIPS}"
 export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
 export GOROOT_FINAL = "${libdir}/go"
 export CGO_ENABLED = "1"
-- 
2.14.1



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v5 03/13] go.bbclass: rename GO_TMPDIR -> GOTMPDIR
  2018-03-04 21:09 [PATCH v5 00/13] go1.10 update and misc improvements Matt Madison
  2018-03-04 21:09 ` [PATCH v5 01/13] go: update go 1.9 -> go 1.10 Matt Madison
  2018-03-04 21:09 ` [PATCH v5 02/13] go: set GOMIPS envrionment variable Matt Madison
@ 2018-03-04 21:09 ` Matt Madison
  2018-03-04 21:09 ` [PATCH v5 04/13] go.bbclass: remove debug-related commands Matt Madison
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 22+ messages in thread
From: Matt Madison @ 2018-03-04 21:09 UTC (permalink / raw)
  To: openembedded-core

and export it. Go 1.10 now supports using this
separate variable locating its temporary files.

TMPDIR is still set, for compatibility with go1.9;
that can be dropped once 1.9 is retired.

Signed-off-by: Matt Madison <matt@madison.systems>
---
 meta/classes/go.bbclass | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass
index a01b28bccd..96302a187c 100644
--- a/meta/classes/go.bbclass
+++ b/meta/classes/go.bbclass
@@ -49,8 +49,8 @@ GO_INSTALL_FILTEROUT ?= "${GO_IMPORT}/vendor/"
 B = "${WORKDIR}/build"
 export GOPATH = "${B}"
 export GOCACHE = "off"
-GO_TMPDIR ?= "${WORKDIR}/go-tmp"
-GO_TMPDIR[vardepvalue] = ""
+export GOTMPDIR ?= "${WORKDIR}/go-tmp"
+GOTMPDIR[vardepvalue] = ""
 
 python go_do_unpack() {
     src_uri = (d.getVar('SRC_URI') or "").split()
@@ -85,9 +85,10 @@ go_list_package_tests() {
 go_do_configure() {
 	ln -snf ${S}/src ${B}/
 }
+do_configure[dirs] =+ "${GOTMPDIR}"
 
 go_do_compile() {
-	export TMPDIR="${GO_TMPDIR}"
+	export TMPDIR="${GOTMPDIR}"
 	${GO} env
 	if [ -n "${GO_INSTALL}" ]; then
 		if [ -n "${GO_LINKSHARED}" ]; then
@@ -97,11 +98,11 @@ go_do_compile() {
 		${GO} install ${GO_LINKSHARED} ${GOBUILDFLAGS} `go_list_packages`
 	fi
 }
-do_compile[dirs] =+ "${GO_TMPDIR}"
+do_compile[dirs] =+ "${GOTMPDIR}"
 do_compile[cleandirs] = "${B}/bin ${B}/pkg"
 
 do_compile_ptest() {
-    export TMPDIR="${GO_TMPDIR}"
+	export TMPDIR="${GOTMPDIR}"
     rm -f ${B}/.go_compiled_tests.list
 	go_list_package_tests | while read pkg; do
 		cd ${B}/src/$pkg
@@ -110,7 +111,7 @@ do_compile_ptest() {
 			sed -e's,/\./,/,'>> ${B}/.go_compiled_tests.list
 	done
 }
-do_compile_ptest_base[dirs] =+ "${GO_TMPDIR}"
+do_compile_ptest_base[dirs] =+ "${GOTMPDIR}"
 
 go_do_install() {
 	install -d ${D}${libdir}/go/src/${GO_IMPORT}
-- 
2.14.1



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v5 04/13] go.bbclass: remove debug-related commands
  2018-03-04 21:09 [PATCH v5 00/13] go1.10 update and misc improvements Matt Madison
                   ` (2 preceding siblings ...)
  2018-03-04 21:09 ` [PATCH v5 03/13] go.bbclass: rename GO_TMPDIR -> GOTMPDIR Matt Madison
@ 2018-03-04 21:09 ` Matt Madison
  2018-03-04 21:09 ` [PATCH v5 05/13] go.bbclass: don't stage test data with sources Matt Madison
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 22+ messages in thread
From: Matt Madison @ 2018-03-04 21:09 UTC (permalink / raw)
  To: openembedded-core

The 'go env' in the do_compile function and
the set -x/+x in the do_install_ptest function
were used for debugging the bbclass, and aren't
really needed.

Signed-off-by: Matt Madison <matt@madison.systems>
---
 meta/classes/go.bbclass | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass
index 96302a187c..21ac2276c5 100644
--- a/meta/classes/go.bbclass
+++ b/meta/classes/go.bbclass
@@ -89,7 +89,6 @@ do_configure[dirs] =+ "${GOTMPDIR}"
 
 go_do_compile() {
 	export TMPDIR="${GOTMPDIR}"
-	${GO} env
 	if [ -n "${GO_INSTALL}" ]; then
 		if [ -n "${GO_LINKSHARED}" ]; then
 			${GO} install ${GOBUILDFLAGS} `go_list_packages`
@@ -126,7 +125,6 @@ go_do_install() {
 }
 
 do_install_ptest_base() {
-set -x
     test -f "${B}/.go_compiled_tests.list" || exit 0
     tests=""
     while read test; do
@@ -160,7 +158,6 @@ EOF
     else
         rm -rf ${D}${PTEST_PATH}
     fi
-set +x
 }
 
 EXPORT_FUNCTIONS do_unpack do_configure do_compile do_install
-- 
2.14.1



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v5 05/13] go.bbclass: don't stage test data with sources
  2018-03-04 21:09 [PATCH v5 00/13] go1.10 update and misc improvements Matt Madison
                   ` (3 preceding siblings ...)
  2018-03-04 21:09 ` [PATCH v5 04/13] go.bbclass: remove debug-related commands Matt Madison
@ 2018-03-04 21:09 ` Matt Madison
  2018-03-04 21:09 ` [PATCH v5 06/13] go.bbclass: ptest cleanup and improvements Matt Madison
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 22+ messages in thread
From: Matt Madison @ 2018-03-04 21:09 UTC (permalink / raw)
  To: openembedded-core

Any directory in a Go package's source tree called
'testdata' contains test data, and isn't necessary
for building.

Some packages include ELF files and other binaries
as test data, and staging them in the sysroot and
-dev package leads to unnecessary QA warnings.

Signed-off-by: Matt Madison <matt@madison.systems>
---
 meta/classes/go.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass
index 21ac2276c5..afd68b5951 100644
--- a/meta/classes/go.bbclass
+++ b/meta/classes/go.bbclass
@@ -114,7 +114,7 @@ do_compile_ptest_base[dirs] =+ "${GOTMPDIR}"
 
 go_do_install() {
 	install -d ${D}${libdir}/go/src/${GO_IMPORT}
-	tar -C ${S}/src/${GO_IMPORT} -cf - --exclude-vcs --exclude '*.test' . | \
+	tar -C ${S}/src/${GO_IMPORT} -cf - --exclude-vcs --exclude '*.test' --exclude 'testdata' . | \
 		tar -C ${D}${libdir}/go/src/${GO_IMPORT} --no-same-owner -xf -
 	tar -C ${B} -cf - pkg | tar -C ${D}${libdir}/go --no-same-owner -xf -
 
-- 
2.14.1



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v5 06/13] go.bbclass: ptest cleanup and improvements
  2018-03-04 21:09 [PATCH v5 00/13] go1.10 update and misc improvements Matt Madison
                   ` (4 preceding siblings ...)
  2018-03-04 21:09 ` [PATCH v5 05/13] go.bbclass: don't stage test data with sources Matt Madison
@ 2018-03-04 21:09 ` Matt Madison
  2019-06-21  9:12   ` Yu, Mingli
  2018-03-04 21:09 ` [PATCH v5 07/13] goarch.bbclass: disable shared runtime for nativesdk builds Matt Madison
                   ` (7 subsequent siblings)
  13 siblings, 1 reply; 22+ messages in thread
From: Matt Madison @ 2018-03-04 21:09 UTC (permalink / raw)
  To: openembedded-core

* Don't enable verbose test output (-test.v)
  by default, as it generates too much noise
  for automated results parsing

* Override do_install_ptest_base in the bbclass,
  so recipes can provide their own modifications
  with do_install_ptest.

* Improve the generated run-ptest script to better
  handle large numbers of tests, and to generate
  'status: test name' output similar to Automake
  tests.

* Install all non-vendored 'testdata' directories
  from the source into the ptest package, as some
  packages share test data among multiple tests.

Signed-off-by: Matt Madison <matt@madison.systems>
---
 meta/classes/go.bbclass | 87 +++++++++++++++++++++++++++++--------------------
 1 file changed, 51 insertions(+), 36 deletions(-)

diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass
index afd68b5951..a51ba3e9f0 100644
--- a/meta/classes/go.bbclass
+++ b/meta/classes/go.bbclass
@@ -26,7 +26,7 @@ GO_LDFLAGS ?= '-ldflags="${GO_RPATH} ${GO_LINKMODE} -extldflags '${GO_EXTLDFLAGS
 export GOBUILDFLAGS ?= "-v ${GO_LDFLAGS}"
 export GOPATH_OMIT_IN_ACTIONID ?= "1"
 export GOPTESTBUILDFLAGS ?= "${GOBUILDFLAGS} -c"
-export GOPTESTFLAGS ?= "-test.v"
+export GOPTESTFLAGS ?= ""
 GOBUILDFLAGS_prepend_task-compile = "${GO_PARALLEL_BUILD} "
 
 export GO = "${HOST_PREFIX}go"
@@ -76,7 +76,7 @@ go_list_packages() {
 }
 
 go_list_package_tests() {
-    ${GO} list -f '{{.ImportPath}} {{.TestGoFiles}}' ${GOBUILDFLAGS} ${GO_INSTALL} | \
+	${GO} list -f '{{.ImportPath}} {{.TestGoFiles}}' ${GOBUILDFLAGS} ${GO_INSTALL} | \
 		grep -v '\[\]$' | \
 		egrep -v '${GO_INSTALL_FILTEROUT}' | \
 		awk '{ print $1 }'
@@ -100,15 +100,16 @@ go_do_compile() {
 do_compile[dirs] =+ "${GOTMPDIR}"
 do_compile[cleandirs] = "${B}/bin ${B}/pkg"
 
-do_compile_ptest() {
+do_compile_ptest_base() {
 	export TMPDIR="${GOTMPDIR}"
-    rm -f ${B}/.go_compiled_tests.list
+	rm -f ${B}/.go_compiled_tests.list
 	go_list_package_tests | while read pkg; do
 		cd ${B}/src/$pkg
 		${GO} test ${GOPTESTBUILDFLAGS} $pkg
 		find . -mindepth 1 -maxdepth 1 -type f -name '*.test' -exec echo $pkg/{} \; | \
 			sed -e's,/\./,/,'>> ${B}/.go_compiled_tests.list
 	done
+	do_compile_ptest
 }
 do_compile_ptest_base[dirs] =+ "${GOTMPDIR}"
 
@@ -124,40 +125,54 @@ go_do_install() {
 	fi
 }
 
-do_install_ptest_base() {
-    test -f "${B}/.go_compiled_tests.list" || exit 0
-    tests=""
-    while read test; do
-        tests="$tests${tests:+ }${test%.test}"
-        testdir=`dirname $test`
-        install -d ${D}${PTEST_PATH}/$testdir
-        install -m 0755 ${B}/src/$test ${D}${PTEST_PATH}/$test
-        if [ -d "${B}/src/$testdir/testdata" ]; then
-            cp --preserve=mode,timestamps -R "${B}/src/$testdir/testdata" ${D}${PTEST_PATH}/$testdir
-        fi
-    done < ${B}/.go_compiled_tests.list
-    if [ -n "$tests" ]; then
-        install -d ${D}${PTEST_PATH}
-        cat >${D}${PTEST_PATH}/run-ptest <<EOF
+go_make_ptest_wrapper() {
+	cat >${D}${PTEST_PATH}/run-ptest <<EOF
 #!/bin/sh
-ANYFAILED=0
-for t in $tests; do
-    testdir=\`dirname \$t.test\`
-    if ( cd "${PTEST_PATH}/\$testdir"; "${PTEST_PATH}/\$t.test" ${GOPTESTFLAGS} | tee /dev/fd/9 | grep -q "^FAIL" ) 9>&1; then
-        ANYFAILED=1
-    fi
-done
-if [ \$ANYFAILED -ne 0 ]; then
-    echo "FAIL: ${PN}"
-    exit 1
-fi
-echo "PASS: ${PN}"
-exit 0
+RC=0
+run_test() (
+    cd "\$1"
+    ((((./\$2 ${GOPTESTFLAGS}; echo \$? >&3) | sed -r -e"s,^(PASS|SKIP|FAIL)\$,\\1: \$1/\$2," >&4) 3>&1) | (read rc; exit \$rc)) 4>&1
+    exit \$?)
 EOF
-        chmod +x ${D}${PTEST_PATH}/run-ptest
-    else
-        rm -rf ${D}${PTEST_PATH}
-    fi
+
+}
+
+go_stage_testdata() {
+	oldwd="$PWD"
+	cd ${S}/src
+	find ${GO_IMPORT} -depth -type d -name testdata | while read d; do
+		if echo "$d" | grep -q '/vendor/'; then
+			continue
+		fi
+		parent=`dirname $d`
+		install -d ${D}${PTEST_PATH}/$parent
+		cp --preserve=mode,timestamps -R $d ${D}${PTEST_PATH}/$parent/
+	done
+	cd "$oldwd"
+}
+
+do_install_ptest_base() {
+	test -f "${B}/.go_compiled_tests.list" || exit 0
+	install -d ${D}${PTEST_PATH}
+	go_stage_testdata
+	go_make_ptest_wrapper
+	havetests=""
+	while read test; do
+		testdir=`dirname $test`
+		testprog=`basename $test`
+		install -d ${D}${PTEST_PATH}/$testdir
+		install -m 0755 ${B}/src/$test ${D}${PTEST_PATH}/$test
+	echo "run_test $testdir $testprog || RC=1" >> ${D}${PTEST_PATH}/run-ptest
+		havetests="yes"
+	done < ${B}/.go_compiled_tests.list
+	if [ -n "$havetests" ]; then
+		echo "exit \$RC" >> ${D}${PTEST_PATH}/run-ptest
+		chmod +x ${D}${PTEST_PATH}/run-ptest
+	else
+		rm -rf ${D}${PTEST_PATH}
+	fi
+	do_install_ptest
+	chown -R root:root ${D}${PTEST_PATH}
 }
 
 EXPORT_FUNCTIONS do_unpack do_configure do_compile do_install
-- 
2.14.1



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v5 07/13] goarch.bbclass: disable shared runtime for nativesdk builds
  2018-03-04 21:09 [PATCH v5 00/13] go1.10 update and misc improvements Matt Madison
                   ` (5 preceding siblings ...)
  2018-03-04 21:09 ` [PATCH v5 06/13] go.bbclass: ptest cleanup and improvements Matt Madison
@ 2018-03-04 21:09 ` Matt Madison
  2018-03-04 21:09 ` [PATCH v5 08/13] go: move common settings to go-common.inc Matt Madison
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 22+ messages in thread
From: Matt Madison @ 2018-03-04 21:09 UTC (permalink / raw)
  To: openembedded-core

While useful on embedded devices for saving disk space, use
of shared runtime in Go is not the usual practice, so disable
it for nativesdk builds.  We don't use it for native builds,
either, so this makes the SDK match the native environment
more closely.

Signed-off-by: Matt Madison <matt@madison.systems>
---
 meta/classes/goarch.bbclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/classes/goarch.bbclass b/meta/classes/goarch.bbclass
index 1021b94d4c..5c8ed33b15 100644
--- a/meta/classes/goarch.bbclass
+++ b/meta/classes/goarch.bbclass
@@ -24,6 +24,7 @@ GO_DYNLINK_x86 = "1"
 GO_DYNLINK_x86-64 = "1"
 GO_DYNLINK_powerpc64 = "1"
 GO_DYNLINK_class-native = ""
+GO_DYNLINK_class-nativesdk = ""
 
 # define here because everybody inherits this class
 #
-- 
2.14.1



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v5 08/13] go: move common settings to go-common.inc
  2018-03-04 21:09 [PATCH v5 00/13] go1.10 update and misc improvements Matt Madison
                   ` (6 preceding siblings ...)
  2018-03-04 21:09 ` [PATCH v5 07/13] goarch.bbclass: disable shared runtime for nativesdk builds Matt Madison
@ 2018-03-04 21:09 ` Matt Madison
  2018-03-04 21:09 ` [PATCH v5 09/13] go.bbclass, goarch.bbclass: update SECURITY_CFLAGS Matt Madison
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 22+ messages in thread
From: Matt Madison @ 2018-03-04 21:09 UTC (permalink / raw)
  To: openembedded-core

Eliminate some redundancy in the recipes by moving
some commonly-used variable settings to the common
include file.  Also removed a duplicate inherit
from go-target.inc that was already in go-common.inc.

Signed-off-by: Matt Madison <matt@madison.systems>
---
 meta/recipes-devtools/go/go-common.inc         | 4 ++++
 meta/recipes-devtools/go/go-cross-canadian.inc | 4 ----
 meta/recipes-devtools/go/go-cross.inc          | 3 ---
 meta/recipes-devtools/go/go-crosssdk.inc       | 4 ----
 meta/recipes-devtools/go/go-native.inc         | 3 ---
 meta/recipes-devtools/go/go-runtime.inc        | 5 +----
 meta/recipes-devtools/go/go-target.inc         | 5 -----
 7 files changed, 5 insertions(+), 23 deletions(-)

diff --git a/meta/recipes-devtools/go/go-common.inc b/meta/recipes-devtools/go/go-common.inc
index 611775b2cc..11d55c4d36 100644
--- a/meta/recipes-devtools/go/go-common.inc
+++ b/meta/recipes-devtools/go/go-common.inc
@@ -23,6 +23,10 @@ INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
 SSTATE_SCAN_CMD = "true"
 
 export GOROOT_OVERRIDE = "1"
+export GOTMPDIR ?= "${WORKDIR}/go-tmp"
+GOTMPDIR[vardepvalue] = ""
+export GOCACHE = "off"
+export CGO_ENABLED = "1"
 
 do_compile_prepend() {
 	BUILD_CC=${BUILD_CC}
diff --git a/meta/recipes-devtools/go/go-cross-canadian.inc b/meta/recipes-devtools/go/go-cross-canadian.inc
index 4a43d831fa..e630b83df8 100644
--- a/meta/recipes-devtools/go/go-cross-canadian.inc
+++ b/meta/recipes-devtools/go/go-cross-canadian.inc
@@ -10,10 +10,6 @@ export GOHOSTARCH = "${BUILD_GOARCH}"
 export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
 export GOTOOLDIR_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/${HOST_SYS}/go/pkg/tool/${BUILD_GOTUPLE}"
 export GOROOT_FINAL = "${libdir}/go"
-export CGO_ENABLED = "1"
-export GOCACHE = "off"
-export GOTMPDIR ?= "${WORKDIR}/go-tmp"
-GOTMPDIR[vardepvalue] = ""
 export CGO_CFLAGS = "${CFLAGS}"
 export CGO_LDFLAGS = "${LDFLAGS}"
 export GO_LDFLAGS = '-linkmode external -extld ${HOST_PREFIX}gcc -extldflags "--sysroot=${STAGING_DIR_HOST} ${HOST_CC_ARCH} ${LDFLAGS}"'
diff --git a/meta/recipes-devtools/go/go-cross.inc b/meta/recipes-devtools/go/go-cross.inc
index 289ae77104..44f230b8bc 100644
--- a/meta/recipes-devtools/go/go-cross.inc
+++ b/meta/recipes-devtools/go/go-cross.inc
@@ -15,9 +15,6 @@ export GOMIPS = "${TARGET_GOMIPS}"
 export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
 export GOROOT_FINAL = "${libdir}/go"
 export GOCACHE = "off"
-export GOTMPDIR ?= "${WORKDIR}/go-tmp"
-GOTMPDIR[vardepvalue] = ""
-export CGO_ENABLED = "1"
 CC = "${@d.getVar('BUILD_CC').strip()}"
 
 do_configure[noexec] = "1"
diff --git a/meta/recipes-devtools/go/go-crosssdk.inc b/meta/recipes-devtools/go/go-crosssdk.inc
index 05ca62eba8..4391b32424 100644
--- a/meta/recipes-devtools/go/go-crosssdk.inc
+++ b/meta/recipes-devtools/go/go-crosssdk.inc
@@ -10,10 +10,6 @@ export GOOS = "${TARGET_GOOS}"
 export GOARCH = "${TARGET_GOARCH}"
 export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
 export GOROOT_FINAL = "${libdir}/go"
-export CGO_ENABLED = "1"
-export GOCACHE = "off"
-export GOTMPDIR ?= "${WORKDIR}/go-tmp"
-GOTMPDIR[vardepvalue] = ""
 
 do_configure[noexec] = "1"
 
diff --git a/meta/recipes-devtools/go/go-native.inc b/meta/recipes-devtools/go/go-native.inc
index 35561768df..b76fb0825e 100644
--- a/meta/recipes-devtools/go/go-native.inc
+++ b/meta/recipes-devtools/go/go-native.inc
@@ -10,11 +10,8 @@ SRC_URI[bootstrap.sha256sum] = "f4ff5b5eb3a3cae1c993723f3eab519c5bae18866b5e5f96
 
 export GOOS = "${BUILD_GOOS}"
 export GOARCH = "${BUILD_GOARCH}"
-export GOTMPDIR ?= "${WORKDIR}/go-tmp"
-GOTMPDIR[vardepvalue] = ""
 CC = "${@d.getVar('BUILD_CC').strip()}"
 
-export CGO_ENABLED = "1"
 GOMAKEARGS ?= "--no-banner"
 
 do_configure() {
diff --git a/meta/recipes-devtools/go/go-runtime.inc b/meta/recipes-devtools/go/go-runtime.inc
index 0fe4566360..a79295df47 100644
--- a/meta/recipes-devtools/go/go-runtime.inc
+++ b/meta/recipes-devtools/go/go-runtime.inc
@@ -11,14 +11,11 @@ export GO386 = "${TARGET_GO386}"
 export GOMIPS = "${TARGET_GOMIPS}"
 export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
 export GOROOT_FINAL = "${libdir}/go"
-export CGO_ENABLED = "1"
 export CGO_CFLAGS = "${CFLAGS}"
 export CGO_CPPFLAGS = "${CPPFLAGS}"
 export CGO_CXXFLAGS = "${CXXFLAGS}"
 export CGO_LDFLAGS = "${LDFLAGS}"
-export GOCACHE = "off"
-export GOTMPDIR ?= "${WORKDIR}/go-tmp"
-GOTMPDIR[vardepvalue] = ""
+
 GO_EXTLDFLAGS ?= "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${LDFLAGS}"
 GO_LINKMODE ?= ""
 GO_LINKMODE_class-nativesdk = "--linkmode=external"
diff --git a/meta/recipes-devtools/go/go-target.inc b/meta/recipes-devtools/go/go-target.inc
index 141a456cca..3bc32f3bec 100644
--- a/meta/recipes-devtools/go/go-target.inc
+++ b/meta/recipes-devtools/go/go-target.inc
@@ -1,4 +1,3 @@
-inherit goarch
 DEPENDS = "virtual/${TARGET_PREFIX}go go-native"
 DEPENDS_class-nativesdk = "virtual/${TARGET_PREFIX}go-crosssdk go-native"
 
@@ -11,10 +10,6 @@ export GO386 = "${TARGET_GO386}"
 export GOMIPS = "${TARGET_GOMIPS}"
 export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
 export GOROOT_FINAL = "${libdir}/go"
-export CGO_ENABLED = "1"
-export GOCACHE = "off"
-export GOTMPDIR ?= "${WORKDIR}/go-tmp"
-GOTMPDIR[vardepvalue] = ""
 GO_LDFLAGS = ""
 GO_LDFLAGS_class-nativesdk = "-linkmode external"
 export GO_LDFLAGS
-- 
2.14.1



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v5 09/13] go.bbclass, goarch.bbclass: update SECURITY_CFLAGS
  2018-03-04 21:09 [PATCH v5 00/13] go1.10 update and misc improvements Matt Madison
                   ` (7 preceding siblings ...)
  2018-03-04 21:09 ` [PATCH v5 08/13] go: move common settings to go-common.inc Matt Madison
@ 2018-03-04 21:09 ` Matt Madison
  2018-03-04 21:09 ` [PATCH v5 10/13] go: disable PIE CFLAGS for nativesdk and cross-canadian builds Matt Madison
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 22+ messages in thread
From: Matt Madison @ 2018-03-04 21:09 UTC (permalink / raw)
  To: openembedded-core

With go1.10 the NOPIE flags are only required for
MIPS target builds, and are now incompatible for
the other architectures.

Signed-off-by: Matt Madison <matt@madison.systems>
---
 meta/classes/go.bbclass     | 3 ---
 meta/classes/goarch.bbclass | 2 ++
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass
index a51ba3e9f0..d33d83ea7f 100644
--- a/meta/classes/go.bbclass
+++ b/meta/classes/go.bbclass
@@ -34,9 +34,6 @@ GOTOOLDIR = "${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go/pkg/tool/${BUILD_GOTUPLE}
 GOTOOLDIR_class-native = "${STAGING_LIBDIR_NATIVE}/go/pkg/tool/${BUILD_GOTUPLE}"
 export GOTOOLDIR
 
-SECURITY_CFLAGS = "${SECURITY_NOPIE_CFLAGS}"
-SECURITY_LDFLAGS = ""
-
 export CGO_ENABLED ?= "1"
 export CGO_CFLAGS ?= "${CFLAGS}"
 export CGO_CPPFLAGS ?= "${CPPFLAGS}"
diff --git a/meta/classes/goarch.bbclass b/meta/classes/goarch.bbclass
index 5c8ed33b15..f54c5169e3 100644
--- a/meta/classes/goarch.bbclass
+++ b/meta/classes/goarch.bbclass
@@ -35,6 +35,8 @@ COMPATIBLE_HOST_powerpc64 = "null"
 COMPATIBLE_HOST_mipsarchn32 = "null"
 ARM_INSTRUCTION_SET = "arm"
 TUNE_CCARGS_remove = "-march=mips32r2"
+SECURITY_CFLAGS_mips = "${SECURITY_NOPIE_CFLAGS}"
+SECURITY_NOPIE_CFLAGS ??= ""
 
 def go_map_arch(a, d):
     import re
-- 
2.14.1



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v5 10/13] go: disable PIE CFLAGS for nativesdk and cross-canadian builds
  2018-03-04 21:09 [PATCH v5 00/13] go1.10 update and misc improvements Matt Madison
                   ` (8 preceding siblings ...)
  2018-03-04 21:09 ` [PATCH v5 09/13] go.bbclass, goarch.bbclass: update SECURITY_CFLAGS Matt Madison
@ 2018-03-04 21:09 ` Matt Madison
  2018-03-04 21:09 ` [PATCH v5 11/13] packagegroup-go-sdk-target: add go-runtime-staticdev Matt Madison
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 22+ messages in thread
From: Matt Madison @ 2018-03-04 21:09 UTC (permalink / raw)
  To: openembedded-core

The statically-linked Go code in the toolchain is not compatible
with PIE, so disable its use in the C compiler during the
toolchain build.

Signed-off-by: Matt Madison <matt@madison.systems>
---
 meta/recipes-devtools/go/go-cross-canadian.inc    | 6 +++---
 meta/recipes-devtools/go/go-cross-canadian_1.9.bb | 4 ++--
 meta/recipes-devtools/go/go-target.inc            | 3 +--
 3 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/meta/recipes-devtools/go/go-cross-canadian.inc b/meta/recipes-devtools/go/go-cross-canadian.inc
index e630b83df8..ea68b8875d 100644
--- a/meta/recipes-devtools/go/go-cross-canadian.inc
+++ b/meta/recipes-devtools/go/go-cross-canadian.inc
@@ -12,13 +12,13 @@ export GOTOOLDIR_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/${HOST_SYS}/go/pkg/tool/$
 export GOROOT_FINAL = "${libdir}/go"
 export CGO_CFLAGS = "${CFLAGS}"
 export CGO_LDFLAGS = "${LDFLAGS}"
-export GO_LDFLAGS = '-linkmode external -extld ${HOST_PREFIX}gcc -extldflags "--sysroot=${STAGING_DIR_HOST} ${HOST_CC_ARCH} ${LDFLAGS}"'
+export GO_LDFLAGS = '-linkmode external -extld ${HOST_PREFIX}gcc -extldflags "--sysroot=${STAGING_DIR_HOST} ${SECURITY_NOPIE_CFLAGS} ${HOST_CC_ARCH} ${LDFLAGS}"'
 
 do_configure[noexec] = "1"
 
 do_compile() {
-	export CC_FOR_${HOST_GOOS}_${HOST_GOARCH}="${HOST_PREFIX}gcc --sysroot=${STAGING_DIR_HOST}${SDKPATHNATIVE}"
-	export CXX_FOR_${HOST_GOOS}_${HOST_GOARCH}="${HOST_PREFIX}gxx --sysroot=${STAGING_DIR_HOST}${SDKPATHNATIVE}"
+	export CC_FOR_${HOST_GOOS}_${HOST_GOARCH}="${HOST_PREFIX}gcc --sysroot=${STAGING_DIR_HOST}${SDKPATHNATIVE} ${SECURITY_NOPIE_CFLAGS}"
+	export CXX_FOR_${HOST_GOOS}_${HOST_GOARCH}="${HOST_PREFIX}gxx --sysroot=${STAGING_DIR_HOST}${SDKPATHNATIVE} ${SECURITY_NOPIE_CFLAGS}"
 	cd src
 	./make.bash --host-only --no-banner
 	cd ${B}
diff --git a/meta/recipes-devtools/go/go-cross-canadian_1.9.bb b/meta/recipes-devtools/go/go-cross-canadian_1.9.bb
index 0306fdf684..367a967056 100644
--- a/meta/recipes-devtools/go/go-cross-canadian_1.9.bb
+++ b/meta/recipes-devtools/go/go-cross-canadian_1.9.bb
@@ -3,8 +3,8 @@ require go-${PV}.inc
 
 export GOHOSTOS_CROSS = "${HOST_GOOS}"
 export GOHOSTARCH_CROSS = "${HOST_GOARCH}"
-export CC_FOR_TARGET = "${HOST_PREFIX}gcc --sysroot=${STAGING_DIR_HOST}${SDKPATHNATIVE}"
-export CXX_FOR_TARGET = "${HOST_PREFIX}g++ --sysroot=${STAGING_DIR_HOST}${SDKPATHNATIVE}"
+export CC_FOR_TARGET = "${HOST_PREFIX}gcc --sysroot=${STAGING_DIR_HOST}${SDKPATHNATIVE} ${SECURITY_NOPIE_CFLAGS}"
+export CXX_FOR_TARGET = "${HOST_PREFIX}g++ --sysroot=${STAGING_DIR_HOST}${SDKPATHNATIVE} ${SECURITY_NOPIE_CFLAGS}"
 
 do_compile_prepend() {
 	export GOBIN="${B}/bin"
diff --git a/meta/recipes-devtools/go/go-target.inc b/meta/recipes-devtools/go/go-target.inc
index 3bc32f3bec..29a1344675 100644
--- a/meta/recipes-devtools/go/go-target.inc
+++ b/meta/recipes-devtools/go/go-target.inc
@@ -14,8 +14,7 @@ GO_LDFLAGS = ""
 GO_LDFLAGS_class-nativesdk = "-linkmode external"
 export GO_LDFLAGS
 
-SECURITY_CFLAGS = "${SECURITY_NOPIE_CFLAGS}"
-SECURITY_LDFLAGS = ""
+CC_append_class-nativesdk = " ${SECURITY_NOPIE_CFLAGS}"
 
 do_configure[noexec] = "1"
 
-- 
2.14.1



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v5 11/13] packagegroup-go-sdk-target: add go-runtime-staticdev
  2018-03-04 21:09 [PATCH v5 00/13] go1.10 update and misc improvements Matt Madison
                   ` (9 preceding siblings ...)
  2018-03-04 21:09 ` [PATCH v5 10/13] go: disable PIE CFLAGS for nativesdk and cross-canadian builds Matt Madison
@ 2018-03-04 21:09 ` Matt Madison
  2018-03-04 21:09 ` [PATCH v5 12/13] go-runtime: remove unneeded nativesdk override, rename variable Matt Madison
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 22+ messages in thread
From: Matt Madison @ 2018-03-04 21:09 UTC (permalink / raw)
  To: openembedded-core

to allow go programs to be linked either statically or
dynamically when cross-compiling with the SDK.

Signed-off-by: Matt Madison <matt@madison.systems>
---
 meta/recipes-core/packagegroups/packagegroup-go-sdk-target.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-core/packagegroups/packagegroup-go-sdk-target.bb b/meta/recipes-core/packagegroups/packagegroup-go-sdk-target.bb
index 3e190770a7..7d2ccbda22 100644
--- a/meta/recipes-core/packagegroups/packagegroup-go-sdk-target.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-go-sdk-target.bb
@@ -5,4 +5,5 @@ inherit packagegroup goarch
 RDEPENDS_${PN} = " \
     go-runtime \
     go-runtime-dev \
+    go-runtime-staticdev \
 "
-- 
2.14.1



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v5 12/13] go-runtime: remove unneeded nativesdk override, rename variable
  2018-03-04 21:09 [PATCH v5 00/13] go1.10 update and misc improvements Matt Madison
                   ` (10 preceding siblings ...)
  2018-03-04 21:09 ` [PATCH v5 11/13] packagegroup-go-sdk-target: add go-runtime-staticdev Matt Madison
@ 2018-03-04 21:09 ` Matt Madison
  2018-03-04 21:09 ` [PATCH v5 13/13] tcmode-default.inc: add settings for go Matt Madison
  2018-03-04 21:34 ` ✗ patchtest: failure for go1.10 update and misc improvements (rev5) Patchwork
  13 siblings, 0 replies; 22+ messages in thread
From: Matt Madison @ 2018-03-04 21:09 UTC (permalink / raw)
  To: openembedded-core

since GO_LDFLAGS is also used by the dist tool, and it's confusing
to use a variable with the same name (but not exported, so unused
by make.bash/dist).

Signed-off-by: Matt Madison <matt@madison.systems>
---
 meta/recipes-devtools/go/go-runtime.inc | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-devtools/go/go-runtime.inc b/meta/recipes-devtools/go/go-runtime.inc
index a79295df47..0041e8afab 100644
--- a/meta/recipes-devtools/go/go-runtime.inc
+++ b/meta/recipes-devtools/go/go-runtime.inc
@@ -17,9 +17,7 @@ export CGO_CXXFLAGS = "${CXXFLAGS}"
 export CGO_LDFLAGS = "${LDFLAGS}"
 
 GO_EXTLDFLAGS ?= "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${LDFLAGS}"
-GO_LINKMODE ?= ""
-GO_LINKMODE_class-nativesdk = "--linkmode=external"
-GO_LDFLAGS ?= '-ldflags="${GO_LINKMODE} -extldflags '${GO_EXTLDFLAGS}'"'
+GO_SHLIB_LDFLAGS ?= '-ldflags="--linkmode=external -extldflags '${GO_EXTLDFLAGS}'"'
 
 do_configure() {
 	:
@@ -38,7 +36,7 @@ do_compile() {
 	if [ -n "${GO_DYNLINK}" ]; then
 		export GOTOOLDIR="${B}/pkg/tool/native_native"
 		CC="$CC_FOR_${TARGET_GOOS}_${TARGET_GOARCH}" GOARCH="${TARGET_GOARCH}" GOOS="${TARGET_GOOS}" GOROOT=${B} \
-			$GOTOOLDIR/go_bootstrap install -linkshared -buildmode=shared ${GO_LDFLAGS} std
+			$GOTOOLDIR/go_bootstrap install -linkshared -buildmode=shared ${GO_SHLIB_LDFLAGS} std
 	fi
 	cd ${B}
 }
-- 
2.14.1



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v5 13/13] tcmode-default.inc: add settings for go
  2018-03-04 21:09 [PATCH v5 00/13] go1.10 update and misc improvements Matt Madison
                   ` (11 preceding siblings ...)
  2018-03-04 21:09 ` [PATCH v5 12/13] go-runtime: remove unneeded nativesdk override, rename variable Matt Madison
@ 2018-03-04 21:09 ` Matt Madison
  2018-03-04 21:34 ` ✗ patchtest: failure for go1.10 update and misc improvements (rev5) Patchwork
  13 siblings, 0 replies; 22+ messages in thread
From: Matt Madison @ 2018-03-04 21:09 UTC (permalink / raw)
  To: openembedded-core

to allow GOVERSION to be set for using an older
go toolchain.

Signed-off-by: Matt Madison <matt@madison.systems>
---
 meta/conf/distro/include/tcmode-default.inc | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/meta/conf/distro/include/tcmode-default.inc b/meta/conf/distro/include/tcmode-default.inc
index 87a5920cad..5c6681fb9d 100644
--- a/meta/conf/distro/include/tcmode-default.inc
+++ b/meta/conf/distro/include/tcmode-default.inc
@@ -67,3 +67,13 @@ PREFERRED_VERSION_cross-localedef-native   ?= "${GLIBCVERSION}"
 # Setup suitable toolchain flags
 require conf/distro/include/as-needed.inc
 
+GOVERSION ?= "1.10%"
+PREFERRED_VERSION_virtual/${TARGET_PREFIX}go ?= "${GOVERSION}"
+PREFERRED_VERSION_go-cross-${TARGET_ARCH} ?= "${GOVERSION}"
+PREFERRED_VERSION_go-crosssdk-${SDK_ARCH} ?= "${GOVERSION}"
+PREFERRED_VERSION_go-cross-canadian-${TRANSLATED_TARGET_ARCH} ?= "${GOVERSION}"
+PREFERRED_VERSION_go ?= "${GOVERSION}"
+PREFERRED_VERSION_go-native ?= "${GOVERSION}"
+PREFERRED_VERSION_go-runtime ?= "${GOVERSION}"
+PREFERRED_VERSION_nativesdk-go ?= "${GOVERSION}"
+PREFERRED_VERSION_nativesdk-go-runtime ?= "${GOVERSION}"
-- 
2.14.1



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* ✗ patchtest: failure for go1.10 update and misc improvements (rev5)
  2018-03-04 21:09 [PATCH v5 00/13] go1.10 update and misc improvements Matt Madison
                   ` (12 preceding siblings ...)
  2018-03-04 21:09 ` [PATCH v5 13/13] tcmode-default.inc: add settings for go Matt Madison
@ 2018-03-04 21:34 ` Patchwork
  13 siblings, 0 replies; 22+ messages in thread
From: Patchwork @ 2018-03-04 21:34 UTC (permalink / raw)
  To: Matt Madison; +Cc: openembedded-core

== Series Details ==

Series: go1.10 update and misc improvements (rev5)
Revision: 5
URL   : https://patchwork.openembedded.org/series/11102/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             Patches not removed from tree [test_src_uri_left_files] 
  Suggested fix    Amend the patch containing the software patch file removal
  Patch            0002-cmd-go-fix-CC-and-CXX-environment-variable-construct.patch
  Patch            0001-make.bash-quote-CC_FOR_TARGET.patch
  Patch            0003-make.bash-better-separate-host-and-target-builds.patch
  Patch            0005-cmd-go-make-GOROOT-precious-by-default.patch
  Patch            0009-cmd-go-buildmode-pie-forces-external-linking-mode-on.patch
  Patch            0008-make.bash-add-GOHOSTxx-indirection-for-cross-canadia.patch
  Patch            0007-ld-add-soname-to-shareable-objects.patch
  Patch            0004-cmd-go-allow-GOTOOLDIR-to-be-overridden-in-the-envir.patch
  Patch            0006-make.bash-add-GOTOOLDIR_BOOTSTRAP-environment-variab.patch
  Patch            0010-make.bash-override-CC-when-building-dist-and-go_boot.patch



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v5 06/13] go.bbclass: ptest cleanup and improvements
  2018-03-04 21:09 ` [PATCH v5 06/13] go.bbclass: ptest cleanup and improvements Matt Madison
@ 2019-06-21  9:12   ` Yu, Mingli
  2019-06-25 12:23     ` Matt Madison
  0 siblings, 1 reply; 22+ messages in thread
From: Yu, Mingli @ 2019-06-21  9:12 UTC (permalink / raw)
  To: Matt Madison, openembedded-core

Hi Matt,

I noticed your commit is the latest update for go-dep ptest. But the 
go-dep ptest doesn't work in my environment. I'm trying to figure out 
what's wrong is here though I didn't know much about go.

BTW, Could you help to check?

root@qemux86-64:~# cd /usr/lib64/go-dep/ptest/
root@qemux86-64:/usr/lib64/go-dep/ptest# cat run-ptest
#!/bin/sh
RC=0
run_test() (
     cd "$1"
     ((((./$2 ; echo $? >&3) | sed -r -e"s,^(PASS|SKIP|FAIL)$,\1: 
$1/$2," >&4) 3>&1) | (read rc; exit $rc)) 4>&1
     exit $?)
run_test github.com/golang/dep/cmd/dep dep.test || RC=1
exit $RC
root@qemux86-64:/usr/lib64/go-dep/ptest# ./run-ptest
building testdep failed: exit status 1
can't load package: package .: no Go files in 
/usr/lib64/go-dep/ptest/github.com/golang/dep/cmd/dep
root@qemux86-64:/usr/lib64/go-dep/ptest#

Thanks,

On 2018年03月05日 05:09, Matt Madison wrote:
> * Don't enable verbose test output (-test.v)
>    by default, as it generates too much noise
>    for automated results parsing
>
> * Override do_install_ptest_base in the bbclass,
>    so recipes can provide their own modifications
>    with do_install_ptest.
>
> * Improve the generated run-ptest script to better
>    handle large numbers of tests, and to generate
>    'status: test name' output similar to Automake
>    tests.
>
> * Install all non-vendored 'testdata' directories
>    from the source into the ptest package, as some
>    packages share test data among multiple tests.
>
> Signed-off-by: Matt Madison <matt@madison.systems>
> ---
>   meta/classes/go.bbclass | 87 +++++++++++++++++++++++++++++--------------------
>   1 file changed, 51 insertions(+), 36 deletions(-)
>
> diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass
> index afd68b5951..a51ba3e9f0 100644
> --- a/meta/classes/go.bbclass
> +++ b/meta/classes/go.bbclass
> @@ -26,7 +26,7 @@ GO_LDFLAGS ?= '-ldflags="${GO_RPATH} ${GO_LINKMODE} -extldflags '${GO_EXTLDFLAGS
>   export GOBUILDFLAGS ?= "-v ${GO_LDFLAGS}"
>   export GOPATH_OMIT_IN_ACTIONID ?= "1"
>   export GOPTESTBUILDFLAGS ?= "${GOBUILDFLAGS} -c"
> -export GOPTESTFLAGS ?= "-test.v"
> +export GOPTESTFLAGS ?= ""
>   GOBUILDFLAGS_prepend_task-compile = "${GO_PARALLEL_BUILD} "
>
>   export GO = "${HOST_PREFIX}go"
> @@ -76,7 +76,7 @@ go_list_packages() {
>   }
>
>   go_list_package_tests() {
> -    ${GO} list -f '{{.ImportPath}} {{.TestGoFiles}}' ${GOBUILDFLAGS} ${GO_INSTALL} | \
> +	${GO} list -f '{{.ImportPath}} {{.TestGoFiles}}' ${GOBUILDFLAGS} ${GO_INSTALL} | \
>   		grep -v '\[\]$' | \
>   		egrep -v '${GO_INSTALL_FILTEROUT}' | \
>   		awk '{ print $1 }'
> @@ -100,15 +100,16 @@ go_do_compile() {
>   do_compile[dirs] =+ "${GOTMPDIR}"
>   do_compile[cleandirs] = "${B}/bin ${B}/pkg"
>
> -do_compile_ptest() {
> +do_compile_ptest_base() {
>   	export TMPDIR="${GOTMPDIR}"
> -    rm -f ${B}/.go_compiled_tests.list
> +	rm -f ${B}/.go_compiled_tests.list
>   	go_list_package_tests | while read pkg; do
>   		cd ${B}/src/$pkg
>   		${GO} test ${GOPTESTBUILDFLAGS} $pkg
>   		find . -mindepth 1 -maxdepth 1 -type f -name '*.test' -exec echo $pkg/{} \; | \
>   			sed -e's,/\./,/,'>> ${B}/.go_compiled_tests.list
>   	done
> +	do_compile_ptest
>   }
>   do_compile_ptest_base[dirs] =+ "${GOTMPDIR}"
>
> @@ -124,40 +125,54 @@ go_do_install() {
>   	fi
>   }
>
> -do_install_ptest_base() {
> -    test -f "${B}/.go_compiled_tests.list" || exit 0
> -    tests=""
> -    while read test; do
> -        tests="$tests${tests:+ }${test%.test}"
> -        testdir=`dirname $test`
> -        install -d ${D}${PTEST_PATH}/$testdir
> -        install -m 0755 ${B}/src/$test ${D}${PTEST_PATH}/$test
> -        if [ -d "${B}/src/$testdir/testdata" ]; then
> -            cp --preserve=mode,timestamps -R "${B}/src/$testdir/testdata" ${D}${PTEST_PATH}/$testdir
> -        fi
> -    done < ${B}/.go_compiled_tests.list
> -    if [ -n "$tests" ]; then
> -        install -d ${D}${PTEST_PATH}
> -        cat >${D}${PTEST_PATH}/run-ptest <<EOF
> +go_make_ptest_wrapper() {
> +	cat >${D}${PTEST_PATH}/run-ptest <<EOF
>   #!/bin/sh
> -ANYFAILED=0
> -for t in $tests; do
> -    testdir=\`dirname \$t.test\`
> -    if ( cd "${PTEST_PATH}/\$testdir"; "${PTEST_PATH}/\$t.test" ${GOPTESTFLAGS} | tee /dev/fd/9 | grep -q "^FAIL" ) 9>&1; then
> -        ANYFAILED=1
> -    fi
> -done
> -if [ \$ANYFAILED -ne 0 ]; then
> -    echo "FAIL: ${PN}"
> -    exit 1
> -fi
> -echo "PASS: ${PN}"
> -exit 0
> +RC=0
> +run_test() (
> +    cd "\$1"
> +    ((((./\$2 ${GOPTESTFLAGS}; echo \$? >&3) | sed -r -e"s,^(PASS|SKIP|FAIL)\$,\\1: \$1/\$2," >&4) 3>&1) | (read rc; exit \$rc)) 4>&1
> +    exit \$?)
>   EOF
> -        chmod +x ${D}${PTEST_PATH}/run-ptest
> -    else
> -        rm -rf ${D}${PTEST_PATH}
> -    fi
> +
> +}
> +
> +go_stage_testdata() {
> +	oldwd="$PWD"
> +	cd ${S}/src
> +	find ${GO_IMPORT} -depth -type d -name testdata | while read d; do
> +		if echo "$d" | grep -q '/vendor/'; then
> +			continue
> +		fi
> +		parent=`dirname $d`
> +		install -d ${D}${PTEST_PATH}/$parent
> +		cp --preserve=mode,timestamps -R $d ${D}${PTEST_PATH}/$parent/
> +	done
> +	cd "$oldwd"
> +}
> +
> +do_install_ptest_base() {
> +	test -f "${B}/.go_compiled_tests.list" || exit 0
> +	install -d ${D}${PTEST_PATH}
> +	go_stage_testdata
> +	go_make_ptest_wrapper
> +	havetests=""
> +	while read test; do
> +		testdir=`dirname $test`
> +		testprog=`basename $test`
> +		install -d ${D}${PTEST_PATH}/$testdir
> +		install -m 0755 ${B}/src/$test ${D}${PTEST_PATH}/$test
> +	echo "run_test $testdir $testprog || RC=1" >> ${D}${PTEST_PATH}/run-ptest
> +		havetests="yes"
> +	done < ${B}/.go_compiled_tests.list
> +	if [ -n "$havetests" ]; then
> +		echo "exit \$RC" >> ${D}${PTEST_PATH}/run-ptest
> +		chmod +x ${D}${PTEST_PATH}/run-ptest
> +	else
> +		rm -rf ${D}${PTEST_PATH}
> +	fi
> +	do_install_ptest
> +	chown -R root:root ${D}${PTEST_PATH}
>   }
>
>   EXPORT_FUNCTIONS do_unpack do_configure do_compile do_install
>


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v5 06/13] go.bbclass: ptest cleanup and improvements
  2019-06-21  9:12   ` Yu, Mingli
@ 2019-06-25 12:23     ` Matt Madison
  2019-06-26  9:06       ` Yu, Mingli
  0 siblings, 1 reply; 22+ messages in thread
From: Matt Madison @ 2019-06-25 12:23 UTC (permalink / raw)
  To: Yu, Mingli; +Cc: Patches and discussions about the oe-core layer

On Fri, Jun 21, 2019 at 2:08 AM Yu, Mingli <mingli.yu@windriver.com> wrote:
>
> Hi Matt,
>
> I noticed your commit is the latest update for go-dep ptest. But the
> go-dep ptest doesn't work in my environment. I'm trying to figure out
> what's wrong is here though I didn't know much about go.

I went back over the commits, and I don't think I did anything with
go-dep specifically. I can see that the tests are failing for it, and
it looks like it's because go-dep's test programs make some
assumptions about the environment.  For one thing, it needs the go
compiler installed. It also looks like it's expecting some source
files to be present... in other words, it's not really designed for a
cross-build setup, with tests run on the cross-built target. It could
be messy to work around that, and I'm not sure how useful it would be
anyway, seeing as how go-dep is more of a build tool.  Might be better
to just disable ptests for it completely.

BTW, you can have the test programs generate verbose output by setting
GOPTESTFLAGS = "-test.v" in the recipe, which will add that flag to
their invocation in the wrapper script, or by manually running the
test program on the target and passing that flag (cd into the
directory where the test program is located, then run it with
-test.v).

Regards,
-Matt

>
> BTW, Could you help to check?
>
> root@qemux86-64:~# cd /usr/lib64/go-dep/ptest/
> root@qemux86-64:/usr/lib64/go-dep/ptest# cat run-ptest
> #!/bin/sh
> RC=0
> run_test() (
>      cd "$1"
>      ((((./$2 ; echo $? >&3) | sed -r -e"s,^(PASS|SKIP|FAIL)$,\1:
> $1/$2," >&4) 3>&1) | (read rc; exit $rc)) 4>&1
>      exit $?)
> run_test github.com/golang/dep/cmd/dep dep.test || RC=1
> exit $RC
> root@qemux86-64:/usr/lib64/go-dep/ptest# ./run-ptest
> building testdep failed: exit status 1
> can't load package: package .: no Go files in
> /usr/lib64/go-dep/ptest/github.com/golang/dep/cmd/dep
> root@qemux86-64:/usr/lib64/go-dep/ptest#
>
> Thanks,
>
> On 2018年03月05日 05:09, Matt Madison wrote:
> > * Don't enable verbose test output (-test.v)
> >    by default, as it generates too much noise
> >    for automated results parsing
> >
> > * Override do_install_ptest_base in the bbclass,
> >    so recipes can provide their own modifications
> >    with do_install_ptest.
> >
> > * Improve the generated run-ptest script to better
> >    handle large numbers of tests, and to generate
> >    'status: test name' output similar to Automake
> >    tests.
> >
> > * Install all non-vendored 'testdata' directories
> >    from the source into the ptest package, as some
> >    packages share test data among multiple tests.
> >
> > Signed-off-by: Matt Madison <matt@madison.systems>
> > ---
> >   meta/classes/go.bbclass | 87 +++++++++++++++++++++++++++++--------------------
> >   1 file changed, 51 insertions(+), 36 deletions(-)
> >
> > diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass
> > index afd68b5951..a51ba3e9f0 100644
> > --- a/meta/classes/go.bbclass
> > +++ b/meta/classes/go.bbclass
> > @@ -26,7 +26,7 @@ GO_LDFLAGS ?= '-ldflags="${GO_RPATH} ${GO_LINKMODE} -extldflags '${GO_EXTLDFLAGS
> >   export GOBUILDFLAGS ?= "-v ${GO_LDFLAGS}"
> >   export GOPATH_OMIT_IN_ACTIONID ?= "1"
> >   export GOPTESTBUILDFLAGS ?= "${GOBUILDFLAGS} -c"
> > -export GOPTESTFLAGS ?= "-test.v"
> > +export GOPTESTFLAGS ?= ""
> >   GOBUILDFLAGS_prepend_task-compile = "${GO_PARALLEL_BUILD} "
> >
> >   export GO = "${HOST_PREFIX}go"
> > @@ -76,7 +76,7 @@ go_list_packages() {
> >   }
> >
> >   go_list_package_tests() {
> > -    ${GO} list -f '{{.ImportPath}} {{.TestGoFiles}}' ${GOBUILDFLAGS} ${GO_INSTALL} | \
> > +     ${GO} list -f '{{.ImportPath}} {{.TestGoFiles}}' ${GOBUILDFLAGS} ${GO_INSTALL} | \
> >               grep -v '\[\]$' | \
> >               egrep -v '${GO_INSTALL_FILTEROUT}' | \
> >               awk '{ print $1 }'
> > @@ -100,15 +100,16 @@ go_do_compile() {
> >   do_compile[dirs] =+ "${GOTMPDIR}"
> >   do_compile[cleandirs] = "${B}/bin ${B}/pkg"
> >
> > -do_compile_ptest() {
> > +do_compile_ptest_base() {
> >       export TMPDIR="${GOTMPDIR}"
> > -    rm -f ${B}/.go_compiled_tests.list
> > +     rm -f ${B}/.go_compiled_tests.list
> >       go_list_package_tests | while read pkg; do
> >               cd ${B}/src/$pkg
> >               ${GO} test ${GOPTESTBUILDFLAGS} $pkg
> >               find . -mindepth 1 -maxdepth 1 -type f -name '*.test' -exec echo $pkg/{} \; | \
> >                       sed -e's,/\./,/,'>> ${B}/.go_compiled_tests.list
> >       done
> > +     do_compile_ptest
> >   }
> >   do_compile_ptest_base[dirs] =+ "${GOTMPDIR}"
> >
> > @@ -124,40 +125,54 @@ go_do_install() {
> >       fi
> >   }
> >
> > -do_install_ptest_base() {
> > -    test -f "${B}/.go_compiled_tests.list" || exit 0
> > -    tests=""
> > -    while read test; do
> > -        tests="$tests${tests:+ }${test%.test}"
> > -        testdir=`dirname $test`
> > -        install -d ${D}${PTEST_PATH}/$testdir
> > -        install -m 0755 ${B}/src/$test ${D}${PTEST_PATH}/$test
> > -        if [ -d "${B}/src/$testdir/testdata" ]; then
> > -            cp --preserve=mode,timestamps -R "${B}/src/$testdir/testdata" ${D}${PTEST_PATH}/$testdir
> > -        fi
> > -    done < ${B}/.go_compiled_tests.list
> > -    if [ -n "$tests" ]; then
> > -        install -d ${D}${PTEST_PATH}
> > -        cat >${D}${PTEST_PATH}/run-ptest <<EOF
> > +go_make_ptest_wrapper() {
> > +     cat >${D}${PTEST_PATH}/run-ptest <<EOF
> >   #!/bin/sh
> > -ANYFAILED=0
> > -for t in $tests; do
> > -    testdir=\`dirname \$t.test\`
> > -    if ( cd "${PTEST_PATH}/\$testdir"; "${PTEST_PATH}/\$t.test" ${GOPTESTFLAGS} | tee /dev/fd/9 | grep -q "^FAIL" ) 9>&1; then
> > -        ANYFAILED=1
> > -    fi
> > -done
> > -if [ \$ANYFAILED -ne 0 ]; then
> > -    echo "FAIL: ${PN}"
> > -    exit 1
> > -fi
> > -echo "PASS: ${PN}"
> > -exit 0
> > +RC=0
> > +run_test() (
> > +    cd "\$1"
> > +    ((((./\$2 ${GOPTESTFLAGS}; echo \$? >&3) | sed -r -e"s,^(PASS|SKIP|FAIL)\$,\\1: \$1/\$2," >&4) 3>&1) | (read rc; exit \$rc)) 4>&1
> > +    exit \$?)
> >   EOF
> > -        chmod +x ${D}${PTEST_PATH}/run-ptest
> > -    else
> > -        rm -rf ${D}${PTEST_PATH}
> > -    fi
> > +
> > +}
> > +
> > +go_stage_testdata() {
> > +     oldwd="$PWD"
> > +     cd ${S}/src
> > +     find ${GO_IMPORT} -depth -type d -name testdata | while read d; do
> > +             if echo "$d" | grep -q '/vendor/'; then
> > +                     continue
> > +             fi
> > +             parent=`dirname $d`
> > +             install -d ${D}${PTEST_PATH}/$parent
> > +             cp --preserve=mode,timestamps -R $d ${D}${PTEST_PATH}/$parent/
> > +     done
> > +     cd "$oldwd"
> > +}
> > +
> > +do_install_ptest_base() {
> > +     test -f "${B}/.go_compiled_tests.list" || exit 0
> > +     install -d ${D}${PTEST_PATH}
> > +     go_stage_testdata
> > +     go_make_ptest_wrapper
> > +     havetests=""
> > +     while read test; do
> > +             testdir=`dirname $test`
> > +             testprog=`basename $test`
> > +             install -d ${D}${PTEST_PATH}/$testdir
> > +             install -m 0755 ${B}/src/$test ${D}${PTEST_PATH}/$test
> > +     echo "run_test $testdir $testprog || RC=1" >> ${D}${PTEST_PATH}/run-ptest
> > +             havetests="yes"
> > +     done < ${B}/.go_compiled_tests.list
> > +     if [ -n "$havetests" ]; then
> > +             echo "exit \$RC" >> ${D}${PTEST_PATH}/run-ptest
> > +             chmod +x ${D}${PTEST_PATH}/run-ptest
> > +     else
> > +             rm -rf ${D}${PTEST_PATH}
> > +     fi
> > +     do_install_ptest
> > +     chown -R root:root ${D}${PTEST_PATH}
> >   }
> >
> >   EXPORT_FUNCTIONS do_unpack do_configure do_compile do_install
> >


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v5 06/13] go.bbclass: ptest cleanup and improvements
  2019-06-25 12:23     ` Matt Madison
@ 2019-06-26  9:06       ` Yu, Mingli
  2019-06-26 14:00         ` Matt Madison
  0 siblings, 1 reply; 22+ messages in thread
From: Yu, Mingli @ 2019-06-26  9:06 UTC (permalink / raw)
  To: Matt Madison, Khem Raj, Robert Yang
  Cc: Patches and discussions about the oe-core layer



On 2019年06月25日 20:23, Matt Madison wrote:
> On Fri, Jun 21, 2019 at 2:08 AM Yu, Mingli <mingli.yu@windriver.com> wrote:
>>
>> Hi Matt,
>>
>> I noticed your commit is the latest update for go-dep ptest. But the
>> go-dep ptest doesn't work in my environment. I'm trying to figure out
>> what's wrong is here though I didn't know much about go.
>
> I went back over the commits, and I don't think I did anything with
> go-dep specifically. I can see that the tests are failing for it, and
> it looks like it's because go-dep's test programs make some
> assumptions about the environment.  For one thing, it needs the go
> compiler installed. It also looks like it's expecting some source
> files to be present... in other words, it's not really designed for a
> cross-build setup, with tests run on the cross-built target. It could
> be messy to work around that, and I'm not sure how useful it would be
> anyway, seeing as how go-dep is more of a build tool.  Might be better
> to just disable ptests for it completely.

Many thanks Matt for your information!
Did you ever run go-dep ptest?
Go through the run-ptest script for go-dep, it actually runs the 
/usr/lib64/go-dep/ptest/github.com/golang/dep/cmd/dep/dep.test whose 
source file is 
https://github.com/golang/dep/blob/master/cmd/dep/dep_test.go.

# pwd
/usr/lib64/go-dep/ptest/github.com/golang/dep/cmd/dep
# ./dep.test
building testdep failed: exit status 1
can't load package: package .: no Go files in 
/usr/lib64/go-dep/ptest/github.com/golang/dep/cmd/dep

Check the logic for 
https://github.com/golang/dep/blob/master/cmd/dep/dep_test.go, it try to 
run "go build -o testdep" at its start. And the go compiler exist on our 
target, but I don't know what go files the dep_test.go expects.

Hi Khem,

Do you have any suggestion?

Thanks,

>
> BTW, you can have the test programs generate verbose output by setting
> GOPTESTFLAGS = "-test.v" in the recipe, which will add that flag to
> their invocation in the wrapper script, or by manually running the
> test program on the target and passing that flag (cd into the
> directory where the test program is located, then run it with
> -test.v).
>
> Regards,
> -Matt
>
>>
>> BTW, Could you help to check?
>>
>> root@qemux86-64:~# cd /usr/lib64/go-dep/ptest/
>> root@qemux86-64:/usr/lib64/go-dep/ptest# cat run-ptest
>> #!/bin/sh
>> RC=0
>> run_test() (
>>       cd "$1"
>>       ((((./$2 ; echo $? >&3) | sed -r -e"s,^(PASS|SKIP|FAIL)$,\1:
>> $1/$2," >&4) 3>&1) | (read rc; exit $rc)) 4>&1
>>       exit $?)
>> run_test github.com/golang/dep/cmd/dep dep.test || RC=1
>> exit $RC
>> root@qemux86-64:/usr/lib64/go-dep/ptest# ./run-ptest
>> building testdep failed: exit status 1
>> can't load package: package .: no Go files in
>> /usr/lib64/go-dep/ptest/github.com/golang/dep/cmd/dep
>> root@qemux86-64:/usr/lib64/go-dep/ptest#
>>
>> Thanks,
>>
>> On 2018年03月05日 05:09, Matt Madison wrote:
>>> * Don't enable verbose test output (-test.v)
>>>     by default, as it generates too much noise
>>>     for automated results parsing
>>>
>>> * Override do_install_ptest_base in the bbclass,
>>>     so recipes can provide their own modifications
>>>     with do_install_ptest.
>>>
>>> * Improve the generated run-ptest script to better
>>>     handle large numbers of tests, and to generate
>>>     'status: test name' output similar to Automake
>>>     tests.
>>>
>>> * Install all non-vendored 'testdata' directories
>>>     from the source into the ptest package, as some
>>>     packages share test data among multiple tests.
>>>
>>> Signed-off-by: Matt Madison <matt@madison.systems>
>>> ---
>>>    meta/classes/go.bbclass | 87 +++++++++++++++++++++++++++++--------------------
>>>    1 file changed, 51 insertions(+), 36 deletions(-)
>>>
>>> diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass
>>> index afd68b5951..a51ba3e9f0 100644
>>> --- a/meta/classes/go.bbclass
>>> +++ b/meta/classes/go.bbclass
>>> @@ -26,7 +26,7 @@ GO_LDFLAGS ?= '-ldflags="${GO_RPATH} ${GO_LINKMODE} -extldflags '${GO_EXTLDFLAGS
>>>    export GOBUILDFLAGS ?= "-v ${GO_LDFLAGS}"
>>>    export GOPATH_OMIT_IN_ACTIONID ?= "1"
>>>    export GOPTESTBUILDFLAGS ?= "${GOBUILDFLAGS} -c"
>>> -export GOPTESTFLAGS ?= "-test.v"
>>> +export GOPTESTFLAGS ?= ""
>>>    GOBUILDFLAGS_prepend_task-compile = "${GO_PARALLEL_BUILD} "
>>>
>>>    export GO = "${HOST_PREFIX}go"
>>> @@ -76,7 +76,7 @@ go_list_packages() {
>>>    }
>>>
>>>    go_list_package_tests() {
>>> -    ${GO} list -f '{{.ImportPath}} {{.TestGoFiles}}' ${GOBUILDFLAGS} ${GO_INSTALL} | \
>>> +     ${GO} list -f '{{.ImportPath}} {{.TestGoFiles}}' ${GOBUILDFLAGS} ${GO_INSTALL} | \
>>>                grep -v '\[\]$' | \
>>>                egrep -v '${GO_INSTALL_FILTEROUT}' | \
>>>                awk '{ print $1 }'
>>> @@ -100,15 +100,16 @@ go_do_compile() {
>>>    do_compile[dirs] =+ "${GOTMPDIR}"
>>>    do_compile[cleandirs] = "${B}/bin ${B}/pkg"
>>>
>>> -do_compile_ptest() {
>>> +do_compile_ptest_base() {
>>>        export TMPDIR="${GOTMPDIR}"
>>> -    rm -f ${B}/.go_compiled_tests.list
>>> +     rm -f ${B}/.go_compiled_tests.list
>>>        go_list_package_tests | while read pkg; do
>>>                cd ${B}/src/$pkg
>>>                ${GO} test ${GOPTESTBUILDFLAGS} $pkg
>>>                find . -mindepth 1 -maxdepth 1 -type f -name '*.test' -exec echo $pkg/{} \; | \
>>>                        sed -e's,/\./,/,'>> ${B}/.go_compiled_tests.list
>>>        done
>>> +     do_compile_ptest
>>>    }
>>>    do_compile_ptest_base[dirs] =+ "${GOTMPDIR}"
>>>
>>> @@ -124,40 +125,54 @@ go_do_install() {
>>>        fi
>>>    }
>>>
>>> -do_install_ptest_base() {
>>> -    test -f "${B}/.go_compiled_tests.list" || exit 0
>>> -    tests=""
>>> -    while read test; do
>>> -        tests="$tests${tests:+ }${test%.test}"
>>> -        testdir=`dirname $test`
>>> -        install -d ${D}${PTEST_PATH}/$testdir
>>> -        install -m 0755 ${B}/src/$test ${D}${PTEST_PATH}/$test
>>> -        if [ -d "${B}/src/$testdir/testdata" ]; then
>>> -            cp --preserve=mode,timestamps -R "${B}/src/$testdir/testdata" ${D}${PTEST_PATH}/$testdir
>>> -        fi
>>> -    done < ${B}/.go_compiled_tests.list
>>> -    if [ -n "$tests" ]; then
>>> -        install -d ${D}${PTEST_PATH}
>>> -        cat >${D}${PTEST_PATH}/run-ptest <<EOF
>>> +go_make_ptest_wrapper() {
>>> +     cat >${D}${PTEST_PATH}/run-ptest <<EOF
>>>    #!/bin/sh
>>> -ANYFAILED=0
>>> -for t in $tests; do
>>> -    testdir=\`dirname \$t.test\`
>>> -    if ( cd "${PTEST_PATH}/\$testdir"; "${PTEST_PATH}/\$t.test" ${GOPTESTFLAGS} | tee /dev/fd/9 | grep -q "^FAIL" ) 9>&1; then
>>> -        ANYFAILED=1
>>> -    fi
>>> -done
>>> -if [ \$ANYFAILED -ne 0 ]; then
>>> -    echo "FAIL: ${PN}"
>>> -    exit 1
>>> -fi
>>> -echo "PASS: ${PN}"
>>> -exit 0
>>> +RC=0
>>> +run_test() (
>>> +    cd "\$1"
>>> +    ((((./\$2 ${GOPTESTFLAGS}; echo \$? >&3) | sed -r -e"s,^(PASS|SKIP|FAIL)\$,\\1: \$1/\$2," >&4) 3>&1) | (read rc; exit \$rc)) 4>&1
>>> +    exit \$?)
>>>    EOF
>>> -        chmod +x ${D}${PTEST_PATH}/run-ptest
>>> -    else
>>> -        rm -rf ${D}${PTEST_PATH}
>>> -    fi
>>> +
>>> +}
>>> +
>>> +go_stage_testdata() {
>>> +     oldwd="$PWD"
>>> +     cd ${S}/src
>>> +     find ${GO_IMPORT} -depth -type d -name testdata | while read d; do
>>> +             if echo "$d" | grep -q '/vendor/'; then
>>> +                     continue
>>> +             fi
>>> +             parent=`dirname $d`
>>> +             install -d ${D}${PTEST_PATH}/$parent
>>> +             cp --preserve=mode,timestamps -R $d ${D}${PTEST_PATH}/$parent/
>>> +     done
>>> +     cd "$oldwd"
>>> +}
>>> +
>>> +do_install_ptest_base() {
>>> +     test -f "${B}/.go_compiled_tests.list" || exit 0
>>> +     install -d ${D}${PTEST_PATH}
>>> +     go_stage_testdata
>>> +     go_make_ptest_wrapper
>>> +     havetests=""
>>> +     while read test; do
>>> +             testdir=`dirname $test`
>>> +             testprog=`basename $test`
>>> +             install -d ${D}${PTEST_PATH}/$testdir
>>> +             install -m 0755 ${B}/src/$test ${D}${PTEST_PATH}/$test
>>> +     echo "run_test $testdir $testprog || RC=1" >> ${D}${PTEST_PATH}/run-ptest
>>> +             havetests="yes"
>>> +     done < ${B}/.go_compiled_tests.list
>>> +     if [ -n "$havetests" ]; then
>>> +             echo "exit \$RC" >> ${D}${PTEST_PATH}/run-ptest
>>> +             chmod +x ${D}${PTEST_PATH}/run-ptest
>>> +     else
>>> +             rm -rf ${D}${PTEST_PATH}
>>> +     fi
>>> +     do_install_ptest
>>> +     chown -R root:root ${D}${PTEST_PATH}
>>>    }
>>>
>>>    EXPORT_FUNCTIONS do_unpack do_configure do_compile do_install
>>>
>


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v5 06/13] go.bbclass: ptest cleanup and improvements
  2019-06-26  9:06       ` Yu, Mingli
@ 2019-06-26 14:00         ` Matt Madison
  2019-06-27  6:43           ` Yu, Mingli
  0 siblings, 1 reply; 22+ messages in thread
From: Matt Madison @ 2019-06-26 14:00 UTC (permalink / raw)
  To: Yu, Mingli; +Cc: Patches and discussions about the oe-core layer

On Wed, Jun 26, 2019 at 2:02 AM Yu, Mingli <mingli.yu@windriver.com> wrote:
>
>
>
> On 2019年06月25日 20:23, Matt Madison wrote:
> > On Fri, Jun 21, 2019 at 2:08 AM Yu, Mingli <mingli.yu@windriver.com> wrote:
> >>
> >> Hi Matt,
> >>
> >> I noticed your commit is the latest update for go-dep ptest. But the
> >> go-dep ptest doesn't work in my environment. I'm trying to figure out
> >> what's wrong is here though I didn't know much about go.
> >
> > I went back over the commits, and I don't think I did anything with
> > go-dep specifically. I can see that the tests are failing for it, and
> > it looks like it's because go-dep's test programs make some
> > assumptions about the environment.  For one thing, it needs the go
> > compiler installed. It also looks like it's expecting some source
> > files to be present... in other words, it's not really designed for a
> > cross-build setup, with tests run on the cross-built target. It could
> > be messy to work around that, and I'm not sure how useful it would be
> > anyway, seeing as how go-dep is more of a build tool.  Might be better
> > to just disable ptests for it completely.
>
> Many thanks Matt for your information!
> Did you ever run go-dep ptest?
> Go through the run-ptest script for go-dep, it actually runs the
> /usr/lib64/go-dep/ptest/github.com/golang/dep/cmd/dep/dep.test whose
> source file is
> https://github.com/golang/dep/blob/master/cmd/dep/dep_test.go.

Yes, I see that.  That main program starts by rebuilding the dep
program from source, then runs the tests using that copy of the
program, so it's assuming that you're still in a development
environment where you can run a full go build.  That's what I meant by
it not being designed for a cross-build setup.

I've patched the test program to create a symlink to the installed dep
program instead of rebuilding, and got further.  You'll need to
include 'go', 'git', and 'git-perltools' in the image to get the tests
to run. Some of the test cases failed until I set GOCACHE in the
environment to point to a valid path; I'm not sure why.  The tests
took a long time to run on my qemux86 build, though - at least 30
minutes.

Here's the patch I applied to use the already-built dep binary.  An
alternative approach would be to put everything in place to allow the
test program to rebuild the dep binary itself, but that would drive up
the time for the test run even further.

Regards,
-Matt

---
 cmd/dep/dep_test.go | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/github.com/golang/dep/cmd/dep/dep_test.go
b/src/github.com/golang/dep/cmd/dep/dep_test.go
index 687eef3a..535ca56d 100644
--- a/src/github.com/golang/dep/cmd/dep/dep_test.go
+++ b/src/github.com/golang/dep/cmd/dep/dep_test.go
@@ -18,13 +18,18 @@ import (
 // deletes it after the tests have been run.
 // Most of this is taken from
https://github.com/golang/go/blob/master/src/cmd/go/go_test.go and
reused here.
 func TestMain(m *testing.M) {
- args := []string{"build", "-o", "testdep" + test.ExeSuffix}
- out, err := exec.Command("go", args...).CombinedOutput()
+ args := []string{"dep"}
+ out, err := exec.Command("which", args...).CombinedOutput()
  if err != nil {
- fmt.Fprintf(os.Stderr, "building testdep failed: %v\n%s", err, out)
+ fmt.Fprintf(os.Stderr, "finding dep failed: %v\n%s", err, out)
+ os.Exit(2)
+ }
+ args = []string{"-s", string(out[:len(out)-1]), "testdep" + test.ExeSuffix}
+ out, err = exec.Command("ln", args...).CombinedOutput()
+ if err != nil {
+ fmt.Fprintf(os.Stderr, "symlinking dep failed: %v\n%s", err, out)
  os.Exit(2)
  }
-
  // Don't let these environment variables confuse the test.
  os.Unsetenv("GOPATH")
  os.Unsetenv("GIT_ALLOW_PROTOCOL")
-- 
2.20.1


>
> # pwd
> /usr/lib64/go-dep/ptest/github.com/golang/dep/cmd/dep
> # ./dep.test
> building testdep failed: exit status 1
> can't load package: package .: no Go files in
> /usr/lib64/go-dep/ptest/github.com/golang/dep/cmd/dep
>
> Check the logic for
> https://github.com/golang/dep/blob/master/cmd/dep/dep_test.go, it try to
> run "go build -o testdep" at its start. And the go compiler exist on our
> target, but I don't know what go files the dep_test.go expects.
>
> Hi Khem,
>
> Do you have any suggestion?
>
> Thanks,
>
> >
> > BTW, you can have the test programs generate verbose output by setting
> > GOPTESTFLAGS = "-test.v" in the recipe, which will add that flag to
> > their invocation in the wrapper script, or by manually running the
> > test program on the target and passing that flag (cd into the
> > directory where the test program is located, then run it with
> > -test.v).
> >
> > Regards,
> > -Matt
> >
> >>
> >> BTW, Could you help to check?
> >>
> >> root@qemux86-64:~# cd /usr/lib64/go-dep/ptest/
> >> root@qemux86-64:/usr/lib64/go-dep/ptest# cat run-ptest
> >> #!/bin/sh
> >> RC=0
> >> run_test() (
> >>       cd "$1"
> >>       ((((./$2 ; echo $? >&3) | sed -r -e"s,^(PASS|SKIP|FAIL)$,\1:
> >> $1/$2," >&4) 3>&1) | (read rc; exit $rc)) 4>&1
> >>       exit $?)
> >> run_test github.com/golang/dep/cmd/dep dep.test || RC=1
> >> exit $RC
> >> root@qemux86-64:/usr/lib64/go-dep/ptest# ./run-ptest
> >> building testdep failed: exit status 1
> >> can't load package: package .: no Go files in
> >> /usr/lib64/go-dep/ptest/github.com/golang/dep/cmd/dep
> >> root@qemux86-64:/usr/lib64/go-dep/ptest#
> >>
> >> Thanks,
> >>
> >> On 2018年03月05日 05:09, Matt Madison wrote:
> >>> * Don't enable verbose test output (-test.v)
> >>>     by default, as it generates too much noise
> >>>     for automated results parsing
> >>>
> >>> * Override do_install_ptest_base in the bbclass,
> >>>     so recipes can provide their own modifications
> >>>     with do_install_ptest.
> >>>
> >>> * Improve the generated run-ptest script to better
> >>>     handle large numbers of tests, and to generate
> >>>     'status: test name' output similar to Automake
> >>>     tests.
> >>>
> >>> * Install all non-vendored 'testdata' directories
> >>>     from the source into the ptest package, as some
> >>>     packages share test data among multiple tests.
> >>>
> >>> Signed-off-by: Matt Madison <matt@madison.systems>
> >>> ---
> >>>    meta/classes/go.bbclass | 87 +++++++++++++++++++++++++++++--------------------
> >>>    1 file changed, 51 insertions(+), 36 deletions(-)
> >>>
> >>> diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass
> >>> index afd68b5951..a51ba3e9f0 100644
> >>> --- a/meta/classes/go.bbclass
> >>> +++ b/meta/classes/go.bbclass
> >>> @@ -26,7 +26,7 @@ GO_LDFLAGS ?= '-ldflags="${GO_RPATH} ${GO_LINKMODE} -extldflags '${GO_EXTLDFLAGS
> >>>    export GOBUILDFLAGS ?= "-v ${GO_LDFLAGS}"
> >>>    export GOPATH_OMIT_IN_ACTIONID ?= "1"
> >>>    export GOPTESTBUILDFLAGS ?= "${GOBUILDFLAGS} -c"
> >>> -export GOPTESTFLAGS ?= "-test.v"
> >>> +export GOPTESTFLAGS ?= ""
> >>>    GOBUILDFLAGS_prepend_task-compile = "${GO_PARALLEL_BUILD} "
> >>>
> >>>    export GO = "${HOST_PREFIX}go"
> >>> @@ -76,7 +76,7 @@ go_list_packages() {
> >>>    }
> >>>
> >>>    go_list_package_tests() {
> >>> -    ${GO} list -f '{{.ImportPath}} {{.TestGoFiles}}' ${GOBUILDFLAGS} ${GO_INSTALL} | \
> >>> +     ${GO} list -f '{{.ImportPath}} {{.TestGoFiles}}' ${GOBUILDFLAGS} ${GO_INSTALL} | \
> >>>                grep -v '\[\]$' | \
> >>>                egrep -v '${GO_INSTALL_FILTEROUT}' | \
> >>>                awk '{ print $1 }'
> >>> @@ -100,15 +100,16 @@ go_do_compile() {
> >>>    do_compile[dirs] =+ "${GOTMPDIR}"
> >>>    do_compile[cleandirs] = "${B}/bin ${B}/pkg"
> >>>
> >>> -do_compile_ptest() {
> >>> +do_compile_ptest_base() {
> >>>        export TMPDIR="${GOTMPDIR}"
> >>> -    rm -f ${B}/.go_compiled_tests.list
> >>> +     rm -f ${B}/.go_compiled_tests.list
> >>>        go_list_package_tests | while read pkg; do
> >>>                cd ${B}/src/$pkg
> >>>                ${GO} test ${GOPTESTBUILDFLAGS} $pkg
> >>>                find . -mindepth 1 -maxdepth 1 -type f -name '*.test' -exec echo $pkg/{} \; | \
> >>>                        sed -e's,/\./,/,'>> ${B}/.go_compiled_tests.list
> >>>        done
> >>> +     do_compile_ptest
> >>>    }
> >>>    do_compile_ptest_base[dirs] =+ "${GOTMPDIR}"
> >>>
> >>> @@ -124,40 +125,54 @@ go_do_install() {
> >>>        fi
> >>>    }
> >>>
> >>> -do_install_ptest_base() {
> >>> -    test -f "${B}/.go_compiled_tests.list" || exit 0
> >>> -    tests=""
> >>> -    while read test; do
> >>> -        tests="$tests${tests:+ }${test%.test}"
> >>> -        testdir=`dirname $test`
> >>> -        install -d ${D}${PTEST_PATH}/$testdir
> >>> -        install -m 0755 ${B}/src/$test ${D}${PTEST_PATH}/$test
> >>> -        if [ -d "${B}/src/$testdir/testdata" ]; then
> >>> -            cp --preserve=mode,timestamps -R "${B}/src/$testdir/testdata" ${D}${PTEST_PATH}/$testdir
> >>> -        fi
> >>> -    done < ${B}/.go_compiled_tests.list
> >>> -    if [ -n "$tests" ]; then
> >>> -        install -d ${D}${PTEST_PATH}
> >>> -        cat >${D}${PTEST_PATH}/run-ptest <<EOF
> >>> +go_make_ptest_wrapper() {
> >>> +     cat >${D}${PTEST_PATH}/run-ptest <<EOF
> >>>    #!/bin/sh
> >>> -ANYFAILED=0
> >>> -for t in $tests; do
> >>> -    testdir=\`dirname \$t.test\`
> >>> -    if ( cd "${PTEST_PATH}/\$testdir"; "${PTEST_PATH}/\$t.test" ${GOPTESTFLAGS} | tee /dev/fd/9 | grep -q "^FAIL" ) 9>&1; then
> >>> -        ANYFAILED=1
> >>> -    fi
> >>> -done
> >>> -if [ \$ANYFAILED -ne 0 ]; then
> >>> -    echo "FAIL: ${PN}"
> >>> -    exit 1
> >>> -fi
> >>> -echo "PASS: ${PN}"
> >>> -exit 0
> >>> +RC=0
> >>> +run_test() (
> >>> +    cd "\$1"
> >>> +    ((((./\$2 ${GOPTESTFLAGS}; echo \$? >&3) | sed -r -e"s,^(PASS|SKIP|FAIL)\$,\\1: \$1/\$2," >&4) 3>&1) | (read rc; exit \$rc)) 4>&1
> >>> +    exit \$?)
> >>>    EOF
> >>> -        chmod +x ${D}${PTEST_PATH}/run-ptest
> >>> -    else
> >>> -        rm -rf ${D}${PTEST_PATH}
> >>> -    fi
> >>> +
> >>> +}
> >>> +
> >>> +go_stage_testdata() {
> >>> +     oldwd="$PWD"
> >>> +     cd ${S}/src
> >>> +     find ${GO_IMPORT} -depth -type d -name testdata | while read d; do
> >>> +             if echo "$d" | grep -q '/vendor/'; then
> >>> +                     continue
> >>> +             fi
> >>> +             parent=`dirname $d`
> >>> +             install -d ${D}${PTEST_PATH}/$parent
> >>> +             cp --preserve=mode,timestamps -R $d ${D}${PTEST_PATH}/$parent/
> >>> +     done
> >>> +     cd "$oldwd"
> >>> +}
> >>> +
> >>> +do_install_ptest_base() {
> >>> +     test -f "${B}/.go_compiled_tests.list" || exit 0
> >>> +     install -d ${D}${PTEST_PATH}
> >>> +     go_stage_testdata
> >>> +     go_make_ptest_wrapper
> >>> +     havetests=""
> >>> +     while read test; do
> >>> +             testdir=`dirname $test`
> >>> +             testprog=`basename $test`
> >>> +             install -d ${D}${PTEST_PATH}/$testdir
> >>> +             install -m 0755 ${B}/src/$test ${D}${PTEST_PATH}/$test
> >>> +     echo "run_test $testdir $testprog || RC=1" >> ${D}${PTEST_PATH}/run-ptest
> >>> +             havetests="yes"
> >>> +     done < ${B}/.go_compiled_tests.list
> >>> +     if [ -n "$havetests" ]; then
> >>> +             echo "exit \$RC" >> ${D}${PTEST_PATH}/run-ptest
> >>> +             chmod +x ${D}${PTEST_PATH}/run-ptest
> >>> +     else
> >>> +             rm -rf ${D}${PTEST_PATH}
> >>> +     fi
> >>> +     do_install_ptest
> >>> +     chown -R root:root ${D}${PTEST_PATH}
> >>>    }
> >>>
> >>>    EXPORT_FUNCTIONS do_unpack do_configure do_compile do_install
> >>>
> >


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [PATCH v5 06/13] go.bbclass: ptest cleanup and improvements
  2019-06-26 14:00         ` Matt Madison
@ 2019-06-27  6:43           ` Yu, Mingli
  2019-06-27 11:34             ` Matt Madison
  0 siblings, 1 reply; 22+ messages in thread
From: Yu, Mingli @ 2019-06-27  6:43 UTC (permalink / raw)
  To: Matt Madison; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 4367 bytes --]



On 2019年06月26日 22:00, Matt Madison wrote:
> On Wed, Jun 26, 2019 at 2:02 AM Yu, Mingli <mingli.yu@windriver.com> wrote:
>>
>>
>>
>> On 2019年06月25日 20:23, Matt Madison wrote:
>>> On Fri, Jun 21, 2019 at 2:08 AM Yu, Mingli <mingli.yu@windriver.com> wrote:
>>>>
>>>> Hi Matt,
>>>>
>>>> I noticed your commit is the latest update for go-dep ptest. But the
>>>> go-dep ptest doesn't work in my environment. I'm trying to figure out
>>>> what's wrong is here though I didn't know much about go.
>>>
>>> I went back over the commits, and I don't think I did anything with
>>> go-dep specifically. I can see that the tests are failing for it, and
>>> it looks like it's because go-dep's test programs make some
>>> assumptions about the environment.  For one thing, it needs the go
>>> compiler installed. It also looks like it's expecting some source
>>> files to be present... in other words, it's not really designed for a
>>> cross-build setup, with tests run on the cross-built target. It could
>>> be messy to work around that, and I'm not sure how useful it would be
>>> anyway, seeing as how go-dep is more of a build tool.  Might be better
>>> to just disable ptests for it completely.
>>
>> Many thanks Matt for your information!
>> Did you ever run go-dep ptest?
>> Go through the run-ptest script for go-dep, it actually runs the
>> /usr/lib64/go-dep/ptest/github.com/golang/dep/cmd/dep/dep.test whose
>> source file is
>> https://github.com/golang/dep/blob/master/cmd/dep/dep_test.go.
>
> Yes, I see that.  That main program starts by rebuilding the dep
> program from source, then runs the tests using that copy of the
> program, so it's assuming that you're still in a development
> environment where you can run a full go build.  That's what I meant by
> it not being designed for a cross-build setup.
>
> I've patched the test program to create a symlink to the installed dep
> program instead of rebuilding, and got further.  You'll need to
> include 'go', 'git', and 'git-perltools' in the image to get the tests
> to run. Some of the test cases failed until I set GOCACHE in the
> environment to point to a valid path; I'm not sure why.  The tests
> took a long time to run on my qemux86 build, though - at least 30
> minutes.

Thanks very much for Matt's guide!

I have applied the patch you provide to create a symlink to the 
installed dep program instead of rebuilding and also add go', 'git', and 
'git-perltools' into the image, but there is no PASS case, all failed as 
attached go-dep_ptest.log.

BTW, you said you set GOCACHE, what's the valid path do you mean?

Thanks,

>
> Here's the patch I applied to use the already-built dep binary.  An
> alternative approach would be to put everything in place to allow the
> test program to rebuild the dep binary itself, but that would drive up
> the time for the test run even further.
>
> Regards,
> -Matt
>
> ---
>   cmd/dep/dep_test.go | 13 +++++++++----
>   1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/src/github.com/golang/dep/cmd/dep/dep_test.go
> b/src/github.com/golang/dep/cmd/dep/dep_test.go
> index 687eef3a..535ca56d 100644
> --- a/src/github.com/golang/dep/cmd/dep/dep_test.go
> +++ b/src/github.com/golang/dep/cmd/dep/dep_test.go
> @@ -18,13 +18,18 @@ import (
>   // deletes it after the tests have been run.
>   // Most of this is taken from
> https://github.com/golang/go/blob/master/src/cmd/go/go_test.go and
> reused here.
>   func TestMain(m *testing.M) {
> - args := []string{"build", "-o", "testdep" + test.ExeSuffix}
> - out, err := exec.Command("go", args...).CombinedOutput()
> + args := []string{"dep"}
> + out, err := exec.Command("which", args...).CombinedOutput()
>    if err != nil {
> - fmt.Fprintf(os.Stderr, "building testdep failed: %v\n%s", err, out)
> + fmt.Fprintf(os.Stderr, "finding dep failed: %v\n%s", err, out)
> + os.Exit(2)
> + }
> + args = []string{"-s", string(out[:len(out)-1]), "testdep" + test.ExeSuffix}
> + out, err = exec.Command("ln", args...).CombinedOutput()
> + if err != nil {
> + fmt.Fprintf(os.Stderr, "symlinking dep failed: %v\n%s", err, out)
>    os.Exit(2)
>    }
> -
>    // Don't let these environment variables confuse the test.
>    os.Unsetenv("GOPATH")
>    os.Unsetenv("GIT_ALLOW_PROTOCOL")
>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: go-dep_ptest.log --]
[-- Type: text/x-log; name="go-dep_ptest.log", Size: 118133 bytes --]

--- FAIL: TestIntegration (0.46s)
    --- FAIL: TestIntegration/status/revision_constraint (0.00s)
        --- FAIL: TestIntegration/status/revision_constraint/external (0.53s)
            integration_test.go:194: cmd ensure raised an unexpected error: exit status 2
    --- FAIL: TestIntegration/status/override_constraint (0.00s)
        --- FAIL: TestIntegration/status/override_constraint/external (0.52s)
            integration_test.go:194: cmd ensure raised an unexpected error: exit status 2
    --- FAIL: TestIntegration/status/old_constraints (0.00s)
        --- FAIL: TestIntegration/status/old_constraints/external (0.80s)
            integration_test.go:194: cmd ensure raised an unexpected error: exit status 2
    --- FAIL: TestIntegration/status/missing_pkgs_lock_mismatch (0.00s)
        --- FAIL: TestIntegration/status/missing_pkgs_lock_mismatch/external (0.60s)
            integration_test.go:199: exit status 1
            testcase.go:165: error did not contain expected string:
                	(GOT): The following errors occurred while deducing packages:
                  * "github.com/sdboyer/deptestdos": github.com/sdboyer/deptestdos is not a valid path for a source on github.com
                
                validateParams: could not deduce external imports' project roots
                
                	(WNT): is out of sync with imports
    --- FAIL: TestIntegration/status/case1/template (0.00s)
        --- FAIL: TestIntegration/status/case1/template/external (0.59s)
            integration_test.go:194: cmd ensure raised an unexpected error: exit status 2
    --- FAIL: TestIntegration/status/case1/table (0.00s)
        --- FAIL: TestIntegration/status/case1/table/external (0.54s)
            integration_test.go:194: cmd ensure raised an unexpected error: exit status 2
    --- FAIL: TestIntegration/status/case1/json (0.00s)
        --- FAIL: TestIntegration/status/case1/json/external (0.56s)
            integration_test.go:194: cmd ensure raised an unexpected error: exit status 2
    --- FAIL: TestIntegration/status/case1/dot (0.00s)
        --- FAIL: TestIntegration/status/case1/dot/external (0.60s)
            integration_test.go:194: cmd ensure raised an unexpected error: exit status 2
    --- FAIL: TestIntegration/init/vndr/case1 (0.00s)
        --- FAIL: TestIntegration/init/vndr/case1/external (5.66s)
            testproj.go:119: go standard error:
            testproj.go:120: build cache is disabled by GOCACHE=off, but required as of Go 1.12
                
            testproj.go:123: go [get github.com/sdboyer/deptest] failed unexpectedly: exit status 1
        --- FAIL: TestIntegration/init/vndr/case1/internal (5.33s)
            testproj.go:119: go standard error:
            testproj.go:120: build cache is disabled by GOCACHE=off, but required as of Go 1.12
                
            testproj.go:123: go [get github.com/sdboyer/deptest] failed unexpectedly: exit status 1
    --- FAIL: TestIntegration/init/skip-hidden (0.00s)
        --- FAIL: TestIntegration/init/skip-hidden/external (0.54s)
            integration_test.go:199: exit status 2
            testcase.go:187: expected command not to fail, but it did
            testcase.go:171: error raised where none was expected: 
                panic: runtime error: invalid memory address or nil pointer dereference
                [signal SIGSEGV: segmentation violation code=0x1 addr=0x3d pc=0x7f56cc475840]
                
                goroutine 1 [running]:
                regexp.(*Regexp).FindStringSubmatch(0xc0003a4900, 0xc000446de1, 0x1a, 0x56145830f980, 0xc0003a4900, 0x5614582e4e80)
                	/usr/lib64/go/src/regexp/regexp.go:982 +0x50
                github.com/golang/dep/gps.githubDeducer.deduceRoot(0xc0003a4900, 0xc000446de1, 0x1a, 0x561458210add, 0xb, 0x56145830f980, 0xc0003a4900)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/deduce.go:115 +0x45
                github.com/golang/dep/gps.(*deductionCoordinator).deduceKnownPaths(0xc00045ae10, 0xc000446de1, 0x1a, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc0003671a0, 0xc0003671b8)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/deduce.go:668 +0x107
                github.com/golang/dep/gps.(*deductionCoordinator).deduceRootPath(0xc00045ae10, 0x561458311f00, 0xc0003280f8, 0xc000446de1, 0x1a, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/deduce.go:608 +0x35b
                github.com/golang/dep/gps.(*SourceMgr).DeduceProjectRoot(0xc0003662a0, 0xc000446de1, 0x1a, 0x561458311f40, 0x0, 0xc0000126c0, 0x1)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/source_manager.go:595 +0xf4
                github.com/golang/dep.(*Project).GetDirectDependencyNames(0xc0003a5200, 0x561458315760, 0xc0003662a0, 0x1, 0xc0003a5200, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/project.go:238 +0xae
                main.(*initCommand).Run(0xc00043373a, 0xc0003a8980, 0xc000324e00, 0x0, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/init.go:105 +0x15c
                main.(*Config).Run(0xc000366f00, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:212 +0x115d
                main.main()
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:84 +0x69a
    --- FAIL: TestIntegration/init/relative_path (0.00s)
        --- FAIL: TestIntegration/init/relative_path/external (0.50s)
            integration_test.go:199: exit status 1
            testcase.go:187: expected command not to fail, but it did
            testcase.go:171: error raised where none was expected: 
                init failed: unable to determine direct dependencies: github.com/sdboyer/deptest is not a valid path for a source on github.com
    --- FAIL: TestIntegration/init/gvt/case1 (0.00s)
        --- FAIL: TestIntegration/init/gvt/case1/external (5.81s)
            testproj.go:119: go standard error:
            testproj.go:120: build cache is disabled by GOCACHE=off, but required as of Go 1.12
                
            testproj.go:123: go [get github.com/sdboyer/deptest] failed unexpectedly: exit status 1
        --- FAIL: TestIntegration/init/gvt/case1/internal (7.97s)
            testproj.go:119: go standard error:
            testproj.go:120: build cache is disabled by GOCACHE=off, but required as of Go 1.12
                
            testproj.go:123: go [get github.com/sdboyer/deptest] failed unexpectedly: exit status 1
    --- FAIL: TestIntegration/init/govendor/case1 (0.00s)
        --- FAIL: TestIntegration/init/govendor/case1/external (8.10s)
            testproj.go:119: go standard error:
            testproj.go:120: build cache is disabled by GOCACHE=off, but required as of Go 1.12
                
            testproj.go:123: go [get github.com/sdboyer/deptest] failed unexpectedly: exit status 1
        --- FAIL: TestIntegration/init/govendor/case1/internal (7.69s)
            testproj.go:119: go standard error:
            testproj.go:120: build cache is disabled by GOCACHE=off, but required as of Go 1.12
                
            testproj.go:123: go [get github.com/sdboyer/deptest] failed unexpectedly: exit status 1
    --- FAIL: TestIntegration/init/govend/case1 (0.00s)
        --- FAIL: TestIntegration/init/govend/case1/external (8.34s)
            testproj.go:119: go standard error:
            testproj.go:120: build cache is disabled by GOCACHE=off, but required as of Go 1.12
                
            testproj.go:123: go [get github.com/sdboyer/deptest] failed unexpectedly: exit status 1
        --- FAIL: TestIntegration/init/govend/case1/internal (5.19s)
            testproj.go:119: go standard error:
            testproj.go:120: build cache is disabled by GOCACHE=off, but required as of Go 1.12
                
            testproj.go:123: go [get github.com/sdboyer/deptest] failed unexpectedly: exit status 1
    --- FAIL: TestIntegration/init/godep/case1 (0.00s)
        --- FAIL: TestIntegration/init/godep/case1/external (5.81s)
            testproj.go:119: go standard error:
            testproj.go:120: build cache is disabled by GOCACHE=off, but required as of Go 1.12
                
            testproj.go:123: go [get github.com/sdboyer/deptest] failed unexpectedly: exit status 1
        --- FAIL: TestIntegration/init/godep/case1/internal (5.11s)
            testproj.go:119: go standard error:
            testproj.go:120: build cache is disabled by GOCACHE=off, but required as of Go 1.12
                
            testproj.go:123: go [get github.com/sdboyer/deptest] failed unexpectedly: exit status 1
    --- FAIL: TestIntegration/init/glock/case1 (0.00s)
        --- FAIL: TestIntegration/init/glock/case1/external (5.51s)
            testproj.go:119: go standard error:
            testproj.go:120: build cache is disabled by GOCACHE=off, but required as of Go 1.12
                
            testproj.go:123: go [get github.com/sdboyer/deptest] failed unexpectedly: exit status 1
        --- FAIL: TestIntegration/init/glock/case1/internal (7.87s)
            testproj.go:119: go standard error:
            testproj.go:120: build cache is disabled by GOCACHE=off, but required as of Go 1.12
                
            testproj.go:123: go [get github.com/sdboyer/deptest] failed unexpectedly: exit status 1
    --- FAIL: TestIntegration/init/glide/trans-trans-unspecified (0.00s)
        --- FAIL: TestIntegration/init/glide/trans-trans-unspecified/external (0.54s)
            integration_test.go:199: exit status 1
            testcase.go:187: expected command not to fail, but it did
            testcase.go:171: error raised where none was expected: 
                init failed: unable to determine direct dependencies: github.com/ChinmayR/deptestglideA is not a valid path for a source on github.com
    --- FAIL: TestIntegration/init/glide/trans-trans (0.00s)
        --- FAIL: TestIntegration/init/glide/trans-trans/external (0.81s)
            integration_test.go:199: exit status 1
            testcase.go:187: expected command not to fail, but it did
            testcase.go:171: error raised where none was expected: 
                init failed: unable to determine direct dependencies: github.com/ChinmayR/deptestglideA is not a valid path for a source on github.com
    --- FAIL: TestIntegration/init/glide/direct-trans-no-conflict (0.00s)
        --- FAIL: TestIntegration/init/glide/direct-trans-no-conflict/external (0.84s)
            integration_test.go:199: exit status 2
            testcase.go:187: expected command not to fail, but it did
            testcase.go:171: error raised where none was expected: 
                panic: runtime error: invalid memory address or nil pointer dereference
                [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x7f07193cb840]
                
                goroutine 1 [running]:
                regexp.(*Regexp).FindStringSubmatch(0xc0003a4900, 0xc00032ef01, 0x21, 0x55963b61b980, 0xc0003a4900, 0x55963b5f0e80)
                	/usr/lib64/go/src/regexp/regexp.go:982 +0x50
                github.com/golang/dep/gps.githubDeducer.deduceRoot(0xc0003a4900, 0xc00032ef01, 0x21, 0x55963b51cadd, 0xb, 0x55963b61b980, 0xc0003a4900)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/deduce.go:115 +0x45
                github.com/golang/dep/gps.(*deductionCoordinator).deduceKnownPaths(0xc00045ae10, 0xc00032ef01, 0x21, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000366a80, 0xc000366a98)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/deduce.go:668 +0x107
                github.com/golang/dep/gps.(*deductionCoordinator).deduceRootPath(0xc00045ae10, 0x55963b61df00, 0xc0003280f8, 0xc00032ef01, 0x21, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/deduce.go:608 +0x35b
                github.com/golang/dep/gps.(*SourceMgr).DeduceProjectRoot(0xc000366660, 0xc00032ef01, 0x21, 0x55963b61df40, 0x0, 0xc00000f980, 0x2)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/source_manager.go:595 +0xf4
                github.com/golang/dep.(*Project).GetDirectDependencyNames(0xc0003a43f0, 0x55963b621760, 0xc000366660, 0x1, 0xc0003a43f0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/project.go:238 +0xae
                main.(*initCommand).Run(0xc0004322d2, 0xc0003a8200, 0xc0003244a0, 0x0, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/init.go:105 +0x15c
                main.(*Config).Run(0xc000366480, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:212 +0x115d
                main.main()
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:84 +0x69a
    --- FAIL: TestIntegration/init/glide/direct-trans-conflict (0.00s)
        --- FAIL: TestIntegration/init/glide/direct-trans-conflict/external (0.55s)
            integration_test.go:199: exit status 1
            testcase.go:165: error did not contain expected string:
                	(GOT): init failed: unable to determine direct dependencies: github.com/ChinmayR/deptestglideA is not a valid path for a source on github.com
                
                	(WNT): master: Could not introduce github.com/ChinmayR/deptestglideA@master, as it is not allowed by constraint ^0.1.0 from project github.com/golang/notexist.
    --- FAIL: TestIntegration/init/glide/corrupt-glide (0.00s)
        --- FAIL: TestIntegration/init/glide/corrupt-glide/external (0.52s)
            integration_test.go:199: exit status 1
            testcase.go:187: expected command not to fail, but it did
            testcase.go:171: error raised where none was expected: 
                init failed: unable to determine direct dependencies: github.com/ChinmayR/deptestglideA is not a valid path for a source on github.com
    --- FAIL: TestIntegration/init/glide/case4 (0.00s)
        --- FAIL: TestIntegration/init/glide/case4/external (5.48s)
            testproj.go:119: go standard error:
            testproj.go:120: build cache is disabled by GOCACHE=off, but required as of Go 1.12
                
            testproj.go:123: go [get github.com/sdboyer/deptest] failed unexpectedly: exit status 1
        --- FAIL: TestIntegration/init/glide/case4/internal (5.42s)
            testproj.go:119: go standard error:
            testproj.go:120: build cache is disabled by GOCACHE=off, but required as of Go 1.12
                
            testproj.go:123: go [get github.com/sdboyer/deptest] failed unexpectedly: exit status 1
    --- FAIL: TestIntegration/init/glide/case3 (0.00s)
        --- FAIL: TestIntegration/init/glide/case3/external (0.55s)
            integration_test.go:199: exit status 1
            testcase.go:187: expected command not to fail, but it did
            testcase.go:171: error raised where none was expected: 
                init failed: unable to determine direct dependencies: github.com/carolynvs/deptestglide is not a valid path for a source on github.com
    --- FAIL: TestIntegration/init/glide/case2 (0.00s)
        --- FAIL: TestIntegration/init/glide/case2/external (5.33s)
            testproj.go:119: go standard error:
            testproj.go:120: build cache is disabled by GOCACHE=off, but required as of Go 1.12
                
            testproj.go:123: go [get github.com/sdboyer/deptest] failed unexpectedly: exit status 1
        --- FAIL: TestIntegration/init/glide/case2/internal (5.24s)
            testproj.go:119: go standard error:
            testproj.go:120: build cache is disabled by GOCACHE=off, but required as of Go 1.12
                
            testproj.go:123: go [get github.com/sdboyer/deptest] failed unexpectedly: exit status 1
    --- FAIL: TestIntegration/init/glide/case1 (0.00s)
        --- FAIL: TestIntegration/init/glide/case1/external (5.46s)
            testproj.go:119: go standard error:
            testproj.go:120: build cache is disabled by GOCACHE=off, but required as of Go 1.12
                
            testproj.go:123: go [get github.com/sdboyer/deptest] failed unexpectedly: exit status 1
        --- FAIL: TestIntegration/init/glide/case1/internal (5.22s)
            testproj.go:119: go standard error:
            testproj.go:120: build cache is disabled by GOCACHE=off, but required as of Go 1.12
                
            testproj.go:123: go [get github.com/sdboyer/deptest] failed unexpectedly: exit status 1
    --- FAIL: TestIntegration/init/case4 (0.00s)
        --- FAIL: TestIntegration/init/case4/external (10.57s)
            testproj.go:119: go standard error:
            testproj.go:120: build cache is disabled by GOCACHE=off, but required as of Go 1.12
                
            testproj.go:123: go [get github.com/sdboyer/deptestdos] failed unexpectedly: exit status 1
        --- FAIL: TestIntegration/init/case4/internal (10.06s)
            testproj.go:119: go standard error:
            testproj.go:120: build cache is disabled by GOCACHE=off, but required as of Go 1.12
                
            testproj.go:123: go [get github.com/sdboyer/deptestdos] failed unexpectedly: exit status 1
    --- FAIL: TestIntegration/init/case3 (0.00s)
        --- FAIL: TestIntegration/init/case3/external (9.79s)
            testproj.go:119: go standard error:
            testproj.go:120: build cache is disabled by GOCACHE=off, but required as of Go 1.12
                
            testproj.go:123: go [get github.com/sdboyer/deptestdos] failed unexpectedly: exit status 1
        --- FAIL: TestIntegration/init/case3/internal (10.28s)
            testproj.go:119: go standard error:
            testproj.go:120: build cache is disabled by GOCACHE=off, but required as of Go 1.12
                
            testproj.go:123: go [get github.com/sdboyer/deptestdos] failed unexpectedly: exit status 1
    --- FAIL: TestIntegration/init/case2 (0.00s)
        --- FAIL: TestIntegration/init/case2/external (5.32s)
            testproj.go:119: go standard error:
            testproj.go:120: build cache is disabled by GOCACHE=off, but required as of Go 1.12
                
            testproj.go:123: go [get github.com/sdboyer/deptest] failed unexpectedly: exit status 1
        --- FAIL: TestIntegration/init/case2/internal (5.19s)
            testproj.go:119: go standard error:
            testproj.go:120: build cache is disabled by GOCACHE=off, but required as of Go 1.12
                
            testproj.go:123: go [get github.com/sdboyer/deptest] failed unexpectedly: exit status 1
    --- FAIL: TestIntegration/init/case1 (0.00s)
        --- FAIL: TestIntegration/init/case1/external (5.72s)
            testproj.go:119: go standard error:
            testproj.go:120: build cache is disabled by GOCACHE=off, but required as of Go 1.12
                
            testproj.go:123: go [get github.com/sdboyer/deptest] failed unexpectedly: exit status 1
        --- FAIL: TestIntegration/init/case1/internal (5.09s)
            testproj.go:119: go standard error:
            testproj.go:120: build cache is disabled by GOCACHE=off, but required as of Go 1.12
                
            testproj.go:123: go [get github.com/sdboyer/deptest] failed unexpectedly: exit status 1
    --- FAIL: TestIntegration/ensure/update/novendor (0.00s)
        --- FAIL: TestIntegration/ensure/update/novendor/external (0.53s)
            integration_test.go:199: exit status 2
            testcase.go:187: expected command not to fail, but it did
            testcase.go:171: error raised where none was expected: 
                panic: runtime error: makeslice: len out of range
                
                goroutine 1 [running]:
                regexp.(*Regexp).doOnePass(0xc0003a4120, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000432648, 0x5, 0x0, 0x616c6f672f6d6f63, ...)
                	/usr/lib64/go/src/regexp/exec.go:405 +0x9a8
                regexp.(*Regexp).doExecute(0xc0003a4120, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000432648, 0x5, 0x0, 0x616c6f672f6d6f63, ...)
                	/usr/lib64/go/src/regexp/exec.go:528 +0x51d
                regexp.(*Regexp).FindStringSubmatch(0xc0003a4120, 0xc000432648, 0x5, 0xc000464500, 0x7fd7c111d760, 0xc000012700)
                	/usr/lib64/go/src/regexp/regexp.go:982 +0xb7
                github.com/golang/dep/vendor/github.com/Masterminds/semver.parseConstraint(0xc000432648, 0x5, 0x1, 0xc0000131f0, 0x0, 0x0, 0xc0000131e0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/parse.go:24 +0x61
                github.com/golang/dep/vendor/github.com/Masterminds/semver.newConstraint(0xc000432648, 0x5, 0x7fd7c064f301, 0xc000214600, 0x10, 0x10, 0x7fd7c111d760, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/constraints.go:145 +0x3ff
                github.com/golang/dep/vendor/github.com/Masterminds/semver.NewConstraintIC(...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/constraints.go:123
                github.com/golang/dep/gps.NewSemverConstraintIC(0xc000432648, 0x5, 0x203000, 0xc0000131a0, 0x1, 0x203000)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/constraint.go:136 +0x67
                github.com/golang/dep.toProject(0xc000446f00, 0x1a, 0x0, 0x0, 0x0, 0x0, 0xc000432648, 0x5, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:509 +0x274
                github.com/golang/dep.fromRawManifest(0xc000324230, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:381 +0x288
                github.com/golang/dep.readManifest(0x55614d400c20, 0xc000212000, 0xc000212000, 0xc000000000, 0xc000212000, 0x0, 0x0, 0x7fd7c06756ef)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:362 +0x262
                github.com/golang/dep.(*Ctx).LoadProject(0xc0003a8980, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/context.go:170 +0x293
                main.(*ensureCommand).Run(0xc000433740, 0xc0003a8980, 0xc000324e00, 0x0, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/ensure.go:162 +0x7d
                main.(*Config).Run(0xc000366f00, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:212 +0x115d
                main.main()
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:84 +0x69a
    --- FAIL: TestIntegration/ensure/update/errs/spec-with-source (0.00s)
        --- FAIL: TestIntegration/ensure/update/errs/spec-with-source/external (0.53s)
            integration_test.go:199: exit status 2
            testcase.go:165: error did not contain expected string:
                	(GOT): panic: runtime error: makeslice: len out of range
                
                goroutine 1 [running]:
                regexp.(*Regexp).doOnePass(0xc0003a4120, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000432638, 0x5, 0x0, 0x616c6f672f6d6f63, ...)
                	/usr/lib64/go/src/regexp/exec.go:405 +0x9a8
                regexp.(*Regexp).doExecute(0xc0003a4120, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000432638, 0x5, 0x0, 0x616c6f672f6d6f63, ...)
                	/usr/lib64/go/src/regexp/exec.go:528 +0x51d
                regexp.(*Regexp).FindStringSubmatch(0xc0003a4120, 0xc000432638, 0x5, 0xc000466500, 0x7f3c0692c760, 0xc000012700)
                	/usr/lib64/go/src/regexp/regexp.go:982 +0xb7
                github.com/golang/dep/vendor/github.com/Masterminds/semver.parseConstraint(0xc000432638, 0x5, 0x1, 0xc0000131f0, 0x0, 0x0, 0xc0000131e0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/parse.go:24 +0x61
                github.com/golang/dep/vendor/github.com/Masterminds/semver.newConstraint(0xc000432638, 0x5, 0x7f3c05e5e301, 0xc000214600, 0x10, 0x10, 0x7f3c0692c760, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/constraints.go:145 +0x3ff
                github.com/golang/dep/vendor/github.com/Masterminds/semver.NewConstraintIC(...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/constraints.go:123
                github.com/golang/dep/gps.NewSemverConstraintIC(0xc000432638, 0x5, 0x203000, 0xc0000131a0, 0x1, 0x203000)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/constraint.go:136 +0x67
                github.com/golang/dep.toProject(0xc000446f00, 0x1a, 0x0, 0x0, 0x0, 0x0, 0xc000432638, 0x5, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:509 +0x274
                github.com/golang/dep.fromRawManifest(0xc000324230, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:381 +0x288
                github.com/golang/dep.readManifest(0x55ca00adec20, 0xc000212000, 0xc000212000, 0xc000000000, 0xc000212000, 0x0, 0x0, 0x7f3c05e846ef)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:362 +0x262
                github.com/golang/dep.(*Ctx).LoadProject(0xc0003a8980, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/context.go:170 +0x293
                main.(*ensureCommand).Run(0xc000433740, 0xc0003a8980, 0xc000324e00, 0x1, 0x1, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/ensure.go:162 +0x7d
                main.(*Config).Run(0xc000366f00, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:212 +0x115d
                main.main()
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:84 +0x69a
                
                	(WNT): version constraint ^1.0.0 passed for github.com/sdboyer/deptest, but -update follows constraints declared in
    --- FAIL: TestIntegration/ensure/update/errs/spec-with-constraint (0.00s)
        --- FAIL: TestIntegration/ensure/update/errs/spec-with-constraint/external (1.06s)
            integration_test.go:199: exit status 1
            testcase.go:165: error did not contain expected string:
                	(GOT): The following issues were found in Gopkg.toml:
                
                  ✗ github.com/sdboyer/deptest is not a valid path for a source on github.com
                
                ProjectRoot name validation failed
                
                	(WNT): cannot specify alternate sources on -update (github.com/other/deptest)
    --- FAIL: TestIntegration/ensure/update/errs/not-in-lock (0.00s)
        --- FAIL: TestIntegration/ensure/update/errs/not-in-lock/external (1.19s)
            integration_test.go:199: exit status 2
            testcase.go:165: error did not contain expected string:
                	(GOT): panic: runtime error: makeslice: len out of range
                
                goroutine 1 [running]:
                regexp.(*Regexp).doOnePass(0xc0003ac120, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc00043c668, 0x5, 0x0, 0x616c6f672f6d6f63, ...)
                	/usr/lib64/go/src/regexp/exec.go:405 +0x9a8
                regexp.(*Regexp).doExecute(0xc0003ac120, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc00043c668, 0x5, 0x0, 0x616c6f672f6d6f63, ...)
                	/usr/lib64/go/src/regexp/exec.go:528 +0x51d
                regexp.(*Regexp).FindStringSubmatch(0xc0003ac120, 0xc00043c668, 0x5, 0xc000464500, 0x7f5003c15760, 0xc0000130e0)
                	/usr/lib64/go/src/regexp/regexp.go:982 +0xb7
                github.com/golang/dep/vendor/github.com/Masterminds/semver.parseConstraint(0xc00043c668, 0x5, 0x1, 0xc000013330, 0x0, 0x0, 0xc000013320)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/parse.go:24 +0x61
                github.com/golang/dep/vendor/github.com/Masterminds/semver.newConstraint(0xc00043c668, 0x5, 0x7f5003147301, 0xc000214600, 0x10, 0x10, 0x7f5003c15760, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/constraints.go:145 +0x3ff
                github.com/golang/dep/vendor/github.com/Masterminds/semver.NewConstraintIC(...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/constraints.go:123
                github.com/golang/dep/gps.NewSemverConstraintIC(0xc00043c668, 0x5, 0x203000, 0xc0000132e0, 0x1, 0x203000)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/constraint.go:136 +0x67
                github.com/golang/dep.toProject(0xc00044ef00, 0x1a, 0x0, 0x0, 0x0, 0x0, 0xc00043c668, 0x5, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:509 +0x274
                github.com/golang/dep.fromRawManifest(0xc000324280, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:381 +0x288
                github.com/golang/dep.readManifest(0x5609125c1c20, 0xc000212000, 0xc000212000, 0xc000000000, 0xc000212000, 0x0, 0x0, 0x7f500316d6ef)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:362 +0x262
                github.com/golang/dep.(*Ctx).LoadProject(0xc0003b0000, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/context.go:170 +0x293
                main.(*ensureCommand).Run(0xc00043d740, 0xc0003b0000, 0xc000324e00, 0x1, 0x1, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/ensure.go:162 +0x7d
                main.(*Config).Run(0xc000366f00, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:212 +0x115d
                main.main()
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:84 +0x69a
                
                	(WNT): github.com/sdboyer/deptesttres is not present in Gopkg.lock, cannot -update it
    --- FAIL: TestIntegration/ensure/update/errs/nonroot-arg (0.00s)
        --- FAIL: TestIntegration/ensure/update/errs/nonroot-arg/external (1.14s)
            integration_test.go:199: exit status 2
            testcase.go:165: error did not contain expected string:
                	(GOT): panic: runtime error: makeslice: len out of range
                
                goroutine 1 [running]:
                regexp.(*Regexp).doOnePass(0xc0003a4240, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc0004328d8, 0x5, 0x0, 0x616c6f672f6d6f63, ...)
                	/usr/lib64/go/src/regexp/exec.go:405 +0x9a8
                regexp.(*Regexp).doExecute(0xc0003a4240, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc0004328d8, 0x5, 0x0, 0x616c6f672f6d6f63, ...)
                	/usr/lib64/go/src/regexp/exec.go:528 +0x51d
                regexp.(*Regexp).FindStringSubmatch(0xc0003a4240, 0xc0004328d8, 0x5, 0x5, 0x7f2b6e616460, 0xc000013400)
                	/usr/lib64/go/src/regexp/regexp.go:982 +0xb7
                github.com/golang/dep/vendor/github.com/Masterminds/semver.NewVersion(0xc0004328d8, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/version.go:81 +0x165
                github.com/golang/dep/gps.NewVersion(...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/version.go:107
                github.com/golang/dep.toProject(0xc000446f00, 0x1a, 0x0, 0x0, 0x0, 0x0, 0xc0004328d8, 0x5, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:512 +0x2d6
                github.com/golang/dep.fromRawManifest(0xc0003245f0, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:381 +0x288
                github.com/golang/dep.readManifest(0x55e107176c20, 0xc000212010, 0xc000212010, 0xc000000000, 0xc000212010, 0x0, 0x0, 0x7f2b6ca2a6ef)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:362 +0x262
                github.com/golang/dep.(*Ctx).LoadProject(0xc0003a8080, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/context.go:170 +0x293
                main.(*ensureCommand).Run(0xc000432256, 0xc0003a8080, 0xc0003243b0, 0x1, 0x1, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/ensure.go:162 +0x7d
                main.(*Config).Run(0xc0003662a0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:212 +0x115d
                main.main()
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:84 +0x69a
                
                	(WNT): github.com/sdboyer/deptest/subpkg is not a project root, try github.com/sdboyer/deptest instead
    --- FAIL: TestIntegration/ensure/update/errs/lockless (0.00s)
        --- FAIL: TestIntegration/ensure/update/errs/lockless/external (1.11s)
            integration_test.go:199: exit status 2
            testcase.go:165: error did not contain expected string:
                	(GOT): panic: runtime error: makeslice: len out of range
                
                goroutine 1 [running]:
                regexp.(*Regexp).doOnePass(0xc0003a4120, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000432688, 0x5, 0x0, 0x616c6f672f6d6f63, ...)
                	/usr/lib64/go/src/regexp/exec.go:405 +0x9a8
                regexp.(*Regexp).doExecute(0xc0003a4120, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000432688, 0x5, 0x0, 0x616c6f672f6d6f63, ...)
                	/usr/lib64/go/src/regexp/exec.go:528 +0x51d
                regexp.(*Regexp).FindStringSubmatch(0xc0003a4120, 0xc000432688, 0x5, 0xc000464500, 0x7f7874b9f760, 0x7f7873302248)
                	/usr/lib64/go/src/regexp/regexp.go:982 +0xb7
                github.com/golang/dep/vendor/github.com/Masterminds/semver.parseConstraint(0xc000432688, 0x5, 0x1, 0xc000013380, 0x0, 0x0, 0xc000013370)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/parse.go:24 +0x61
                github.com/golang/dep/vendor/github.com/Masterminds/semver.newConstraint(0xc000432688, 0x5, 0x7f78740d1301, 0xc000214600, 0x10, 0x10, 0x7f7874b9f760, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/constraints.go:145 +0x3ff
                github.com/golang/dep/vendor/github.com/Masterminds/semver.NewConstraintIC(...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/constraints.go:123
                github.com/golang/dep/gps.NewSemverConstraintIC(0xc000432688, 0x5, 0x203000, 0xc000013330, 0x1, 0x203000)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/constraint.go:136 +0x67
                github.com/golang/dep.toProject(0xc000446f00, 0x1a, 0x0, 0x0, 0x0, 0x0, 0xc000432688, 0x5, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:509 +0x274
                github.com/golang/dep.fromRawManifest(0xc000382320, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:381 +0x288
                github.com/golang/dep.readManifest(0x55cb5be8cc20, 0xc000212000, 0xc000212000, 0xc000000000, 0xc000212000, 0x0, 0x0, 0x7f78740f76ef)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:362 +0x262
                github.com/golang/dep.(*Ctx).LoadProject(0xc0003a8000, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/context.go:170 +0x293
                main.(*ensureCommand).Run(0xc000432006, 0xc0003a8000, 0xc0003243f0, 0x0, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/ensure.go:162 +0x7d
                main.(*Config).Run(0xc0003641e0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:212 +0x115d
                main.main()
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:84 +0x69a
                
                	(WNT): -update works by updating the versions recorded in Gopkg.lock, but Gopkg.lock does not exist
    --- FAIL: TestIntegration/ensure/update/desync (0.00s)
        --- FAIL: TestIntegration/ensure/update/desync/external (1.19s)
            integration_test.go:199: exit status 2
            testcase.go:187: expected command not to fail, but it did
            testcase.go:171: error raised where none was expected: 
                panic: runtime error: makeslice: len out of range
                
                goroutine 1 [running]:
                regexp.(*Regexp).doOnePass(0xc0003a4120, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc0004326a0, 0x6, 0x0, 0x616c6f672f6d6f63, ...)
                	/usr/lib64/go/src/regexp/exec.go:405 +0x9a8
                regexp.(*Regexp).doExecute(0xc0003a4120, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc0004326a0, 0x6, 0x0, 0x616c6f672f6d6f63, ...)
                	/usr/lib64/go/src/regexp/exec.go:528 +0x51d
                regexp.(*Regexp).FindStringSubmatch(0xc0003a4120, 0xc0004326a0, 0x6, 0xc000466500, 0x7f36c7c56760, 0x7f36c63b9248)
                	/usr/lib64/go/src/regexp/regexp.go:982 +0xb7
                github.com/golang/dep/vendor/github.com/Masterminds/semver.parseConstraint(0xc0004326a0, 0x6, 0x1, 0xc000013360, 0x0, 0x0, 0xc000013350)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/parse.go:24 +0x61
                github.com/golang/dep/vendor/github.com/Masterminds/semver.newConstraint(0xc0004326a0, 0x6, 0x7f36c7188301, 0xc000214600, 0x10, 0x10, 0x7f36c7c56760, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/constraints.go:145 +0x3ff
                github.com/golang/dep/vendor/github.com/Masterminds/semver.NewConstraintIC(...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/constraints.go:123
                github.com/golang/dep/gps.NewSemverConstraintIC(0xc0004326a0, 0x6, 0x203000, 0xc000013310, 0x1, 0x203000)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/constraint.go:136 +0x67
                github.com/golang/dep.toProject(0xc00044ef00, 0x1a, 0x0, 0x0, 0x0, 0x0, 0xc0004326a0, 0x6, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:509 +0x274
                github.com/golang/dep.fromRawManifest(0xc0003822d0, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:381 +0x288
                github.com/golang/dep.readManifest(0x5600aa9e9c20, 0xc000212000, 0xc000212000, 0xc000000000, 0xc000212000, 0x0, 0x0, 0x7f36c71ae6ef)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:362 +0x262
                github.com/golang/dep.(*Ctx).LoadProject(0xc0003a8000, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/context.go:170 +0x293
                main.(*ensureCommand).Run(0xc000432006, 0xc0003a8000, 0xc000324130, 0x0, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/ensure.go:162 +0x7d
                main.(*Config).Run(0xc0003641e0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:212 +0x115d
                main.main()
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:84 +0x69a
    --- FAIL: TestIntegration/ensure/update/case1 (0.00s)
        --- FAIL: TestIntegration/ensure/update/case1/external (1.11s)
            integration_test.go:199: exit status 2
            testcase.go:187: expected command not to fail, but it did
            testcase.go:171: error raised where none was expected: 
                panic: runtime error: makeslice: len out of range
                
                goroutine 1 [running]:
                regexp.(*Regexp).doOnePass(0xc0003a4120, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000432680, 0x6, 0x0, 0x616c6f672f6d6f63, ...)
                	/usr/lib64/go/src/regexp/exec.go:405 +0x9a8
                regexp.(*Regexp).doExecute(0xc0003a4120, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000432680, 0x6, 0x0, 0x616c6f672f6d6f63, ...)
                	/usr/lib64/go/src/regexp/exec.go:528 +0x51d
                regexp.(*Regexp).FindStringSubmatch(0xc0003a4120, 0xc000432680, 0x6, 0xc00046e500, 0x7fab13ab3760, 0xc0000130f0)
                	/usr/lib64/go/src/regexp/regexp.go:982 +0xb7
                github.com/golang/dep/vendor/github.com/Masterminds/semver.parseConstraint(0xc000432680, 0x6, 0x1, 0xc000013340, 0x0, 0x0, 0xc000013330)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/parse.go:24 +0x61
                github.com/golang/dep/vendor/github.com/Masterminds/semver.newConstraint(0xc000432680, 0x6, 0x7fab12fe5301, 0xc000214600, 0x10, 0x10, 0x7fab13ab3760, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/constraints.go:145 +0x3ff
                github.com/golang/dep/vendor/github.com/Masterminds/semver.NewConstraintIC(...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/constraints.go:123
                github.com/golang/dep/gps.NewSemverConstraintIC(0xc000432680, 0x6, 0x203000, 0xc0000132f0, 0x1, 0x203000)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/constraint.go:136 +0x67
                github.com/golang/dep.toProject(0xc00044ef00, 0x1a, 0x0, 0x0, 0x0, 0x0, 0xc000432680, 0x6, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:509 +0x274
                github.com/golang/dep.fromRawManifest(0xc000324280, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:381 +0x288
                github.com/golang/dep.readManifest(0x55da1d474c20, 0xc000212000, 0xc000212000, 0xc000000000, 0xc000212000, 0x0, 0x0, 0x7fab1300b6ef)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:362 +0x262
                github.com/golang/dep.(*Ctx).LoadProject(0xc0003a8000, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/context.go:170 +0x293
                main.(*ensureCommand).Run(0xc000433740, 0xc0003a8000, 0xc000324e00, 0x1, 0x1, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/ensure.go:162 +0x7d
                main.(*Config).Run(0xc000366f00, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:212 +0x115d
                main.main()
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:84 +0x69a
    --- FAIL: TestIntegration/ensure/pkg-ignored/wildcard-ignore (0.00s)
        --- FAIL: TestIntegration/ensure/pkg-ignored/wildcard-ignore/external (1.06s)
            integration_test.go:199: exit status 1
            testcase.go:187: expected command not to fail, but it did
            testcase.go:171: error raised where none was expected: 
                The following issues were found in Gopkg.toml:
                
                  ✗ github.com/sdboyer/deptest is not a valid path for a source on github.com
                
                ProjectRoot name validation failed
    --- FAIL: TestIntegration/ensure/noverify/hash_mismatch (0.00s)
        --- FAIL: TestIntegration/ensure/noverify/hash_mismatch/external (1.00s)
            integration_test.go:194: cmd ensure raised an unexpected error: exit status 2
    --- FAIL: TestIntegration/ensure/empty/case3 (0.00s)
        --- FAIL: TestIntegration/ensure/empty/case3/external (1.07s)
            integration_test.go:199: exit status 2
            testcase.go:187: expected command not to fail, but it did
            testcase.go:171: error raised where none was expected: 
                panic: runtime error: makeslice: len out of range
                
                goroutine 9 [running]:
                regexp.(*Regexp).doOnePass(0xc0003a4900, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc00044f240, 0x1a, 0x0, 0x75687469676874, ...)
                	/usr/lib64/go/src/regexp/exec.go:405 +0x9a8
                regexp.(*Regexp).doExecute(0xc0003a4900, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc00044f240, 0x1a, 0x0, 0x75687469676874, ...)
                	/usr/lib64/go/src/regexp/exec.go:528 +0x51d
                regexp.(*Regexp).FindStringSubmatch(0xc0003a4900, 0xc00044f240, 0x1a, 0x55bd229b4980, 0xc0003a4900, 0x55bd22989e80)
                	/usr/lib64/go/src/regexp/regexp.go:982 +0xb7
                github.com/golang/dep/gps.githubDeducer.deduceRoot(0xc0003a4900, 0xc00044f240, 0x1a, 0x55bd228b5add, 0xb, 0x55bd229b4980, 0xc0003a4900)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/deduce.go:115 +0x45
                github.com/golang/dep/gps.(*deductionCoordinator).deduceKnownPaths(0xc000461b00, 0xc00044f240, 0x1a, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000365320, 0xc000365338)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/deduce.go:668 +0x107
                github.com/golang/dep/gps.(*deductionCoordinator).deduceRootPath(0xc000461b00, 0x55bd229b6f00, 0xc0003260f8, 0xc00044f240, 0x1a, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/deduce.go:608 +0x35b
                github.com/golang/dep/gps.(*SourceMgr).DeduceProjectRoot(0xc000365080, 0xc00044f240, 0x1a, 0x0, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/source_manager.go:595 +0xf4
                github.com/golang/dep.ValidateProjectRoots.func1(0xc00044f240, 0x1a)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:306 +0xab
                created by github.com/golang/dep.ValidateProjectRoots
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:316 +0x1b2
    --- FAIL: TestIntegration/ensure/empty/case2 (0.00s)
        --- FAIL: TestIntegration/ensure/empty/case2/external (0.95s)
            integration_test.go:199: exit status 1
            testcase.go:187: expected command not to fail, but it did
            testcase.go:171: error raised where none was expected: 
                The following issues were found in Gopkg.toml:
                
                  ✗ github.com/sdboyer/deptest is not a valid path for a source on github.com
                
                ProjectRoot name validation failed
    --- FAIL: TestIntegration/ensure/empty/case1 (0.00s)
        --- FAIL: TestIntegration/ensure/empty/case1/external (0.59s)
            integration_test.go:194: cmd init raised an unexpected error: exit status 1
    --- FAIL: TestIntegration/ensure/default/nocode-vendoronly (0.00s)
        --- FAIL: TestIntegration/ensure/default/nocode-vendoronly/external (0.69s)
            integration_test.go:199: exit status 2
            testcase.go:187: expected command not to fail, but it did
            testcase.go:171: error raised where none was expected: 
                panic: runtime error: invalid memory address or nil pointer dereference
                [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x7f617e2f6840]
                
                goroutine 9 [running]:
                regexp.(*Regexp).FindStringSubmatch(0xc0003a4900, 0xc000446f00, 0x1a, 0x55ff1442a980, 0xc0003a4900, 0x55ff143ffe80)
                	/usr/lib64/go/src/regexp/regexp.go:982 +0x50
                github.com/golang/dep/gps.githubDeducer.deduceRoot(0xc0003a4900, 0xc000446f00, 0x1a, 0x55ff1432badd, 0xb, 0x55ff1442a980, 0xc0003a4900)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/deduce.go:115 +0x45
                github.com/golang/dep/gps.(*deductionCoordinator).deduceKnownPaths(0xc00045b560, 0xc000446f00, 0x1a, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000365080, 0xc000365098)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/deduce.go:668 +0x107
                github.com/golang/dep/gps.(*deductionCoordinator).deduceRootPath(0xc00045b560, 0x55ff1442cf00, 0xc0003280f8, 0xc000446f00, 0x1a, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/deduce.go:608 +0x35b
                github.com/golang/dep/gps.(*SourceMgr).DeduceProjectRoot(0xc000364de0, 0xc000446f00, 0x1a, 0x0, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/source_manager.go:595 +0xf4
                github.com/golang/dep.ValidateProjectRoots.func1(0xc000446f00, 0x1a)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:306 +0xab
                created by github.com/golang/dep.ValidateProjectRoots
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:316 +0x1b2
    --- FAIL: TestIntegration/ensure/default/hashneq-vendoronly (0.00s)
        --- FAIL: TestIntegration/ensure/default/hashneq-vendoronly/external (0.54s)
            integration_test.go:199: exit status 2
            testcase.go:187: expected command not to fail, but it did
            testcase.go:171: error raised where none was expected: 
                panic: runtime error: makeslice: len out of range
                
                goroutine 1 [running]:
                regexp.(*Regexp).doOnePass(0xc0003a4120, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000432648, 0x5, 0x0, 0x616c6f672f6d6f63, ...)
                	/usr/lib64/go/src/regexp/exec.go:405 +0x9a8
                regexp.(*Regexp).doExecute(0xc0003a4120, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000432648, 0x5, 0x0, 0x616c6f672f6d6f63, ...)
                	/usr/lib64/go/src/regexp/exec.go:528 +0x51d
                regexp.(*Regexp).FindStringSubmatch(0xc0003a4120, 0xc000432648, 0x5, 0xc000464500, 0x7f05217ee760, 0xc000012700)
                	/usr/lib64/go/src/regexp/regexp.go:982 +0xb7
                github.com/golang/dep/vendor/github.com/Masterminds/semver.parseConstraint(0xc000432648, 0x5, 0x1, 0xc0000131f0, 0x0, 0x0, 0xc0000131e0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/parse.go:24 +0x61
                github.com/golang/dep/vendor/github.com/Masterminds/semver.newConstraint(0xc000432648, 0x5, 0x7f0520d20301, 0xc000214600, 0x10, 0x10, 0x7f05217ee760, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/constraints.go:145 +0x3ff
                github.com/golang/dep/vendor/github.com/Masterminds/semver.NewConstraintIC(...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/constraints.go:123
                github.com/golang/dep/gps.NewSemverConstraintIC(0xc000432648, 0x5, 0x203000, 0xc0000131a0, 0x1, 0x203000)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/constraint.go:136 +0x67
                github.com/golang/dep.toProject(0xc000446f00, 0x1a, 0x0, 0x0, 0x0, 0x0, 0xc000432648, 0x5, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:509 +0x274
                github.com/golang/dep.fromRawManifest(0xc000382190, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:381 +0x288
                github.com/golang/dep.readManifest(0x559c3c964c20, 0xc000212000, 0xc000212000, 0xc000000000, 0xc000212000, 0x0, 0x0, 0x7f0520d466ef)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:362 +0x262
                github.com/golang/dep.(*Ctx).LoadProject(0xc0003a8980, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/context.go:170 +0x293
                main.(*ensureCommand).Run(0xc000433740, 0xc0003a8980, 0xc000325670, 0x0, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/ensure.go:162 +0x7d
                main.(*Config).Run(0xc000364f00, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:212 +0x115d
                main.main()
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:84 +0x69a
    --- FAIL: TestIntegration/ensure/default/hasheq-novendor-dry (0.00s)
        --- FAIL: TestIntegration/ensure/default/hasheq-novendor-dry/external (0.53s)
            integration_test.go:199: exit status 2
            testcase.go:187: expected command not to fail, but it did
            testcase.go:171: error raised where none was expected: 
                panic: runtime error: makeslice: len out of range
                
                goroutine 1 [running]:
                regexp.(*Regexp).doOnePass(0xc0003a4120, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000432688, 0x5, 0x0, 0x616c6f672f6d6f63, ...)
                	/usr/lib64/go/src/regexp/exec.go:405 +0x9a8
                regexp.(*Regexp).doExecute(0xc0003a4120, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000432688, 0x5, 0x0, 0x616c6f672f6d6f63, ...)
                	/usr/lib64/go/src/regexp/exec.go:528 +0x51d
                regexp.(*Regexp).FindStringSubmatch(0xc0003a4120, 0xc000432688, 0x5, 0xc000464500, 0x7f8b6f4b4760, 0x7f8b6dc17248)
                	/usr/lib64/go/src/regexp/regexp.go:982 +0xb7
                github.com/golang/dep/vendor/github.com/Masterminds/semver.parseConstraint(0xc000432688, 0x5, 0x1, 0xc000013380, 0x0, 0x0, 0xc000013370)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/parse.go:24 +0x61
                github.com/golang/dep/vendor/github.com/Masterminds/semver.newConstraint(0xc000432688, 0x5, 0x7f8b6e9e6301, 0xc000214600, 0x10, 0x10, 0x7f8b6f4b4760, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/constraints.go:145 +0x3ff
                github.com/golang/dep/vendor/github.com/Masterminds/semver.NewConstraintIC(...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/constraints.go:123
                github.com/golang/dep/gps.NewSemverConstraintIC(0xc000432688, 0x5, 0x203000, 0xc000013330, 0x1, 0x203000)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/constraint.go:136 +0x67
                github.com/golang/dep.toProject(0xc000446f00, 0x1a, 0x0, 0x0, 0x0, 0x0, 0xc000432688, 0x5, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:509 +0x274
                github.com/golang/dep.fromRawManifest(0xc000324410, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:381 +0x288
                github.com/golang/dep.readManifest(0x564c359b5c20, 0xc000212000, 0xc000212000, 0xc000000000, 0xc000212000, 0x0, 0x0, 0x7f8b6ea0c6ef)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:362 +0x262
                github.com/golang/dep.(*Ctx).LoadProject(0xc0003a8000, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/context.go:170 +0x293
                main.(*ensureCommand).Run(0xc000432006, 0xc0003a8000, 0xc0003241d0, 0x0, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/ensure.go:162 +0x7d
                main.(*Config).Run(0xc0003661e0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:212 +0x115d
                main.main()
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:84 +0x69a
    --- FAIL: TestIntegration/ensure/default/hasheq-novendor (0.00s)
        --- FAIL: TestIntegration/ensure/default/hasheq-novendor/external (0.54s)
            integration_test.go:199: exit status 2
            testcase.go:187: expected command not to fail, but it did
            testcase.go:171: error raised where none was expected: 
                panic: runtime error: makeslice: len out of range
                
                goroutine 1 [running]:
                regexp.(*Regexp).doOnePass(0xc0003ac120, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc00043c688, 0x5, 0x0, 0x616c6f672f6d6f63, ...)
                	/usr/lib64/go/src/regexp/exec.go:405 +0x9a8
                regexp.(*Regexp).doExecute(0xc0003ac120, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc00043c688, 0x5, 0x0, 0x616c6f672f6d6f63, ...)
                	/usr/lib64/go/src/regexp/exec.go:528 +0x51d
                regexp.(*Regexp).FindStringSubmatch(0xc0003ac120, 0xc00043c688, 0x5, 0xc000464500, 0x7f24c7f17760, 0x7f24c667a248)
                	/usr/lib64/go/src/regexp/regexp.go:982 +0xb7
                github.com/golang/dep/vendor/github.com/Masterminds/semver.parseConstraint(0xc00043c688, 0x5, 0x1, 0xc000013380, 0x0, 0x0, 0xc000013370)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/parse.go:24 +0x61
                github.com/golang/dep/vendor/github.com/Masterminds/semver.newConstraint(0xc00043c688, 0x5, 0x7f24c7449301, 0xc000214600, 0x10, 0x10, 0x7f24c7f17760, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/constraints.go:145 +0x3ff
                github.com/golang/dep/vendor/github.com/Masterminds/semver.NewConstraintIC(...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/constraints.go:123
                github.com/golang/dep/gps.NewSemverConstraintIC(0xc00043c688, 0x5, 0x203000, 0xc000013330, 0x1, 0x203000)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/constraint.go:136 +0x67
                github.com/golang/dep.toProject(0xc00044ef00, 0x1a, 0x0, 0x0, 0x0, 0x0, 0xc00043c688, 0x5, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:509 +0x274
                github.com/golang/dep.fromRawManifest(0xc00038a2d0, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:381 +0x288
                github.com/golang/dep.readManifest(0x55974a8f4c20, 0xc000212000, 0xc000212000, 0xc000000000, 0xc000212000, 0x0, 0x0, 0x7f24c746f6ef)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:362 +0x262
                github.com/golang/dep.(*Ctx).LoadProject(0xc0003b0000, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/context.go:170 +0x293
                main.(*ensureCommand).Run(0xc00043c006, 0xc0003b0000, 0xc000324370, 0x0, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/ensure.go:162 +0x7d
                main.(*Config).Run(0xc0003641e0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:212 +0x115d
                main.main()
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:84 +0x69a
    --- FAIL: TestIntegration/ensure/default/hasheq-dry (0.00s)
        --- FAIL: TestIntegration/ensure/default/hasheq-dry/external (0.56s)
            integration_test.go:199: exit status 2
            testcase.go:187: expected command not to fail, but it did
            testcase.go:171: error raised where none was expected: 
                panic: runtime error: invalid memory address or nil pointer dereference
                [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x7f34c05bf840]
                
                goroutine 1 [running]:
                regexp.(*Regexp).FindStringSubmatch(0xc0003a4240, 0xc000432ac0, 0x6, 0x6, 0x7f34c1cce460, 0x7f34c01dca00)
                	/usr/lib64/go/src/regexp/regexp.go:982 +0x50
                github.com/golang/dep/vendor/github.com/Masterminds/semver.NewVersion(0xc000432ac0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/version.go:81 +0x165
                github.com/golang/dep/gps.NewVersion(...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/version.go:107
                github.com/golang/dep.fromRawLock(0xc000432ba2, 0x3, 0x1, 0xc000433a28, 0x8, 0x1, 0x0, 0x0, 0x0, 0xc0003a4240, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/lock.go:96 +0x2a3
                github.com/golang/dep.readLock(0x56153803ec20, 0xc000212078, 0xc000212078, 0xc000000000, 0xc000212078)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/lock.go:74 +0x1d2
                github.com/golang/dep.(*Ctx).LoadProject(0xc0003a8980, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/context.go:189 +0x517
                main.(*ensureCommand).Run(0xc000433740, 0xc0003a8980, 0xc000325670, 0x0, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/ensure.go:162 +0x7d
                main.(*Config).Run(0xc000364f00, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:212 +0x115d
                main.main()
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:84 +0x69a
    --- FAIL: TestIntegration/ensure/default/hasheq (0.00s)
        --- FAIL: TestIntegration/ensure/default/hasheq/external (0.53s)
            integration_test.go:199: exit status 2
            testcase.go:187: expected command not to fail, but it did
            testcase.go:171: error raised where none was expected: 
                panic: runtime error: makeslice: len out of range
                
                goroutine 1 [running]:
                regexp.(*Regexp).doOnePass(0xc0003a4120, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000432678, 0x5, 0x0, 0x616c6f672f6d6f63, ...)
                	/usr/lib64/go/src/regexp/exec.go:405 +0x9a8
                regexp.(*Regexp).doExecute(0xc0003a4120, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000432678, 0x5, 0x0, 0x616c6f672f6d6f63, ...)
                	/usr/lib64/go/src/regexp/exec.go:528 +0x51d
                regexp.(*Regexp).FindStringSubmatch(0xc0003a4120, 0xc000432678, 0x5, 0xc000464500, 0x7f076b5f0760, 0x7f0769d53248)
                	/usr/lib64/go/src/regexp/regexp.go:982 +0xb7
                github.com/golang/dep/vendor/github.com/Masterminds/semver.parseConstraint(0xc000432678, 0x5, 0x1, 0xc000013380, 0x0, 0x0, 0xc000013370)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/parse.go:24 +0x61
                github.com/golang/dep/vendor/github.com/Masterminds/semver.newConstraint(0xc000432678, 0x5, 0x7f076ab22301, 0xc000214660, 0x10, 0x10, 0x7f076b5f0760, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/constraints.go:145 +0x3ff
                github.com/golang/dep/vendor/github.com/Masterminds/semver.NewConstraintIC(...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/constraints.go:123
                github.com/golang/dep/gps.NewSemverConstraintIC(0xc000432678, 0x5, 0x203000, 0xc000013330, 0x1, 0x203000)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/constraint.go:136 +0x67
                github.com/golang/dep.toProject(0xc000446f00, 0x1a, 0x0, 0x0, 0x0, 0x0, 0xc000432678, 0x5, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:509 +0x274
                github.com/golang/dep.fromRawManifest(0xc0003822d0, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:381 +0x288
                github.com/golang/dep.readManifest(0x556e07693c20, 0xc000212000, 0xc000212000, 0xc000000000, 0xc000212000, 0x0, 0x0, 0x7f076ab486ef)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:362 +0x262
                github.com/golang/dep.(*Ctx).LoadProject(0xc0003a8000, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/context.go:170 +0x293
                main.(*ensureCommand).Run(0xc000432004, 0xc0003a8000, 0xc000458680, 0x0, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/ensure.go:162 +0x7d
                main.(*Config).Run(0xc0003641e0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:212 +0x115d
                main.main()
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:84 +0x69a
    --- FAIL: TestIntegration/ensure/default/errs/specargs (0.00s)
        --- FAIL: TestIntegration/ensure/default/errs/specargs/external (0.61s)
            integration_test.go:199: exit status 2
            testcase.go:165: error did not contain expected string:
                	(GOT): panic: runtime error: makeslice: len out of range
                
                goroutine 1 [running]:
                regexp.(*Regexp).doOnePass(0xc0003a4120, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc0004326a8, 0x5, 0x0, 0x616c6f672f6d6f63, ...)
                	/usr/lib64/go/src/regexp/exec.go:405 +0x9a8
                regexp.(*Regexp).doExecute(0xc0003a4120, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc0004326a8, 0x5, 0x0, 0x616c6f672f6d6f63, ...)
                	/usr/lib64/go/src/regexp/exec.go:528 +0x51d
                regexp.(*Regexp).FindStringSubmatch(0xc0003a4120, 0xc0004326a8, 0x5, 0xc00046e500, 0x7fbf4b8d8760, 0x7fbf4a03b248)
                	/usr/lib64/go/src/regexp/regexp.go:982 +0xb7
                github.com/golang/dep/vendor/github.com/Masterminds/semver.parseConstraint(0xc0004326a8, 0x5, 0x1, 0xc000013390, 0x0, 0x0, 0xc000013380)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/parse.go:24 +0x61
                github.com/golang/dep/vendor/github.com/Masterminds/semver.newConstraint(0xc0004326a8, 0x5, 0x7fbf4ae0a301, 0xc000214600, 0x10, 0x10, 0x7fbf4b8d8760, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/constraints.go:145 +0x3ff
                github.com/golang/dep/vendor/github.com/Masterminds/semver.NewConstraintIC(...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/constraints.go:123
                github.com/golang/dep/gps.NewSemverConstraintIC(0xc0004326a8, 0x5, 0x203000, 0xc000013340, 0x1, 0x203000)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/constraint.go:136 +0x67
                github.com/golang/dep.toProject(0xc00044ef00, 0x1a, 0x0, 0x0, 0x0, 0x0, 0xc0004326a8, 0x5, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:509 +0x274
                github.com/golang/dep.fromRawManifest(0xc0003823c0, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:381 +0x288
                github.com/golang/dep.readManifest(0x5575d0ee1c20, 0xc000212000, 0xc000212000, 0xc000000000, 0xc000212000, 0x0, 0x0, 0x7fbf4ae306ef)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:362 +0x262
                github.com/golang/dep.(*Ctx).LoadProject(0xc0003a8000, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/context.go:170 +0x293
                main.(*ensureCommand).Run(0xc000432026, 0xc0003a8000, 0xc0003243f0, 0x1, 0x1, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/ensure.go:162 +0x7d
                main.(*Config).Run(0xc0003641e0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:212 +0x115d
                main.main()
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:84 +0x69a
                
                	(WNT): dep ensure only takes spec arguments with -add or -update
    --- FAIL: TestIntegration/ensure/default/errs/lockless-vendoronly (0.00s)
        --- FAIL: TestIntegration/ensure/default/errs/lockless-vendoronly/external (0.57s)
            integration_test.go:199: exit status 2
            testcase.go:165: error did not contain expected string:
                	(GOT): panic: runtime error: makeslice: len out of range
                
                goroutine 1 [running]:
                regexp.(*Regexp).doOnePass(0xc0003a6120, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000432688, 0x5, 0x0, 0x616c6f672f6d6f63, ...)
                	/usr/lib64/go/src/regexp/exec.go:405 +0x9a8
                regexp.(*Regexp).doExecute(0xc0003a6120, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000432688, 0x5, 0x0, 0x616c6f672f6d6f63, ...)
                	/usr/lib64/go/src/regexp/exec.go:528 +0x51d
                regexp.(*Regexp).FindStringSubmatch(0xc0003a6120, 0xc000432688, 0x5, 0xc000466500, 0x7f3adb8a2760, 0x7f3ada005248)
                	/usr/lib64/go/src/regexp/regexp.go:982 +0xb7
                github.com/golang/dep/vendor/github.com/Masterminds/semver.parseConstraint(0xc000432688, 0x5, 0x1, 0xc000013380, 0x0, 0x0, 0xc000013370)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/parse.go:24 +0x61
                github.com/golang/dep/vendor/github.com/Masterminds/semver.newConstraint(0xc000432688, 0x5, 0x7f3adadd4301, 0xc000214600, 0x10, 0x10, 0x7f3adb8a2760, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/constraints.go:145 +0x3ff
                github.com/golang/dep/vendor/github.com/Masterminds/semver.NewConstraintIC(...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/constraints.go:123
                github.com/golang/dep/gps.NewSemverConstraintIC(0xc000432688, 0x5, 0x203000, 0xc000013330, 0x1, 0x203000)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/constraint.go:136 +0x67
                github.com/golang/dep.toProject(0xc000446f00, 0x1a, 0x0, 0x0, 0x0, 0x0, 0xc000432688, 0x5, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:509 +0x274
                github.com/golang/dep.fromRawManifest(0xc000382320, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:381 +0x288
                github.com/golang/dep.readManifest(0x56056fbedc20, 0xc000212000, 0xc000212000, 0xc000000000, 0xc000212000, 0x0, 0x0, 0x7f3adadfa6ef)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:362 +0x262
                github.com/golang/dep.(*Ctx).LoadProject(0xc0003aa000, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/context.go:170 +0x293
                main.(*ensureCommand).Run(0xc000432006, 0xc0003aa000, 0xc0003243f0, 0x0, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/ensure.go:162 +0x7d
                main.(*Config).Run(0xc0003641e0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:212 +0x115d
                main.main()
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:84 +0x69a
                
                	(WNT): no Gopkg.lock exists from which to populate vendor/
    --- FAIL: TestIntegration/ensure/add/exists-manifest-constraint (0.00s)
        --- FAIL: TestIntegration/ensure/add/exists-manifest-constraint/external (0.51s)
            integration_test.go:199: exit status 1
            testcase.go:187: expected command not to fail, but it did
            testcase.go:171: error raised where none was expected: 
                The following issues were found in Gopkg.toml:
                
                  ✗ github.com/sdboyer/deptest is not a valid path for a source on github.com
                  ✗ github.com/sdboyer/deptesttres is not a valid path for a source on github.com
                
                ProjectRoot name validation failed
    --- FAIL: TestIntegration/ensure/add/errs/self-add/case2 (0.00s)
        --- FAIL: TestIntegration/ensure/add/errs/self-add/case2/external (1.05s)
            integration_test.go:199: exit status 1
            testcase.go:165: error did not contain expected string:
                	(GOT): (1/1) github.com/golang/notexist
                
                Failed to add the dependencies:
                
                  ✗ could not infer project root from dependency path: github.com/golang/notexist: github.com/golang/notexist is not a valid path for a source on github.com
                
                adding dependencies failed
                
                	(WNT): cannot add current project to itself
    --- FAIL: TestIntegration/ensure/add/errs/self-add/case1 (0.00s)
        --- FAIL: TestIntegration/ensure/add/errs/self-add/case1/external (0.56s)
            integration_test.go:199: exit status 2
            testcase.go:165: error did not contain expected string:
                	(GOT): panic: runtime error: makeslice: len out of range
                
                goroutine 1 [running]:
                regexp.(*Regexp).doOnePass(0xc0003a4120, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000432638, 0x5, 0x0, 0x616c6f672f6d6f63, ...)
                	/usr/lib64/go/src/regexp/exec.go:405 +0x9a8
                regexp.(*Regexp).doExecute(0xc0003a4120, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000432638, 0x5, 0x0, 0x616c6f672f6d6f63, ...)
                	/usr/lib64/go/src/regexp/exec.go:528 +0x51d
                regexp.(*Regexp).FindStringSubmatch(0xc0003a4120, 0xc000432638, 0x5, 0xc000464500, 0x7f29fc712760, 0xc000012700)
                	/usr/lib64/go/src/regexp/regexp.go:982 +0xb7
                github.com/golang/dep/vendor/github.com/Masterminds/semver.parseConstraint(0xc000432638, 0x5, 0x1, 0xc0000131f0, 0x0, 0x0, 0xc0000131e0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/parse.go:24 +0x61
                github.com/golang/dep/vendor/github.com/Masterminds/semver.newConstraint(0xc000432638, 0x5, 0x7f29fbc44301, 0xc000214600, 0x10, 0x10, 0x7f29fc712760, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/constraints.go:145 +0x3ff
                github.com/golang/dep/vendor/github.com/Masterminds/semver.NewConstraintIC(...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/constraints.go:123
                github.com/golang/dep/gps.NewSemverConstraintIC(0xc000432638, 0x5, 0x203000, 0xc0000131a0, 0x1, 0x203000)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/constraint.go:136 +0x67
                github.com/golang/dep.toProject(0xc000446f00, 0x1a, 0x0, 0x0, 0x0, 0x0, 0xc000432638, 0x5, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:509 +0x274
                github.com/golang/dep.fromRawManifest(0xc000324230, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:381 +0x288
                github.com/golang/dep.readManifest(0x55b80681ac20, 0xc000212000, 0xc000212000, 0xc000000000, 0xc000212000, 0x0, 0x0, 0x7f29fbc6a6ef)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:362 +0x262
                github.com/golang/dep.(*Ctx).LoadProject(0xc0003a8980, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/context.go:170 +0x293
                main.(*ensureCommand).Run(0xc000433740, 0xc0003a8980, 0xc000324e00, 0x1, 0x1, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/ensure.go:162 +0x7d
                main.(*Config).Run(0xc000366f00, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:212 +0x115d
                main.main()
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:84 +0x69a
                
                	(WNT): cannot add current project to itself
    --- FAIL: TestIntegration/ensure/add/errs/noarg (0.00s)
        --- FAIL: TestIntegration/ensure/add/errs/noarg/external (0.53s)
            integration_test.go:199: exit status 2
            testcase.go:165: error did not contain expected string:
                	(GOT): panic: runtime error: invalid memory address or nil pointer dereference
                [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x7fbdec11c840]
                
                goroutine 1 [running]:
                regexp.(*Regexp).FindStringSubmatch(0xc0003a4240, 0xc00043c830, 0x6, 0x6, 0x7fbded82b460, 0x7fbdebd39a00)
                	/usr/lib64/go/src/regexp/regexp.go:982 +0x50
                github.com/golang/dep/vendor/github.com/Masterminds/semver.NewVersion(0xc00043c830, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/version.go:81 +0x165
                github.com/golang/dep/gps.NewVersion(...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/version.go:107
                github.com/golang/dep.fromRawLock(0xc00043da02, 0x3, 0x1, 0xc00043dc58, 0x8, 0x1, 0x0, 0x0, 0x0, 0xc0003d7440, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/lock.go:96 +0x2a3
                github.com/golang/dep.readLock(0x55efc56dfc20, 0xc000212070, 0xc000212070, 0xc000000000, 0xc000212070)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/lock.go:74 +0x1d2
                github.com/golang/dep.(*Ctx).LoadProject(0xc0003a8980, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/context.go:189 +0x517
                main.(*ensureCommand).Run(0xc00043d740, 0xc0003a8980, 0xc000325670, 0x0, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/ensure.go:162 +0x7d
                main.(*Config).Run(0xc000364f00, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:212 +0x115d
                main.main()
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:84 +0x69a
                
                	(WNT): must specify at least one project or package to -add
    --- FAIL: TestIntegration/ensure/add/errs/exists-manifest (0.00s)
        --- FAIL: TestIntegration/ensure/add/errs/exists-manifest/external (0.57s)
            integration_test.go:199: exit status 1
            testcase.go:165: error did not contain expected string:
                	(GOT): The following issues were found in Gopkg.toml:
                
                  ✗ github.com/sdboyer/deptest is not a valid path for a source on github.com
                  ✗ github.com/sdboyer/deptesttres is not a valid path for a source on github.com
                
                ProjectRoot name validation failed
                
                	(WNT): Gopkg.toml already contains rules for github.com/sdboyer/deptest, cannot specify a version constraint
    --- FAIL: TestIntegration/ensure/add/errs/exists (0.00s)
        --- FAIL: TestIntegration/ensure/add/errs/exists/external (0.53s)
            integration_test.go:199: exit status 2
            testcase.go:165: error did not contain expected string:
                	(GOT): panic: runtime error: invalid memory address or nil pointer dereference
                [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x7fe73a4bf840]
                
                goroutine 1 [running]:
                regexp.(*Regexp).FindStringSubmatch(0xc0003a4240, 0xc00043c920, 0x6, 0x6, 0x7fe73bbce460, 0x7fe73a0dca00)
                	/usr/lib64/go/src/regexp/regexp.go:982 +0x50
                github.com/golang/dep/vendor/github.com/Masterminds/semver.NewVersion(0xc00043c920, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/version.go:81 +0x165
                github.com/golang/dep/gps.NewVersion(...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/version.go:107
                github.com/golang/dep.fromRawLock(0xc00043c9c2, 0x3, 0x1, 0xc00043da38, 0x8, 0x1, 0x0, 0x0, 0x0, 0xc0003a4240, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/lock.go:96 +0x2a3
                github.com/golang/dep.readLock(0x55e711782c20, 0xc000212070, 0xc000212070, 0xc000000000, 0xc000212070)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/lock.go:74 +0x1d2
                github.com/golang/dep.(*Ctx).LoadProject(0xc0003a8980, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/context.go:189 +0x517
                main.(*ensureCommand).Run(0xc00043d740, 0xc0003a8980, 0xc000324e00, 0x1, 0x1, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/ensure.go:162 +0x7d
                main.(*Config).Run(0xc000366f00, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:212 +0x115d
                main.main()
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:84 +0x69a
                
                	(WNT): nothing to -add, github.com/sdboyer/deptest is already in Gopkg.toml and the project's direct imports or required list
    --- FAIL: TestIntegration/ensure/add/errs/double-diff-spec (0.00s)
        --- FAIL: TestIntegration/ensure/add/errs/double-diff-spec/external (0.53s)
            integration_test.go:194: cmd init raised an unexpected error: exit status 2
    --- FAIL: TestIntegration/ensure/add/desync (0.00s)
        --- FAIL: TestIntegration/ensure/add/desync/external (0.52s)
            integration_test.go:199: exit status 1
            testcase.go:187: expected command not to fail, but it did
            testcase.go:171: error raised where none was expected: 
                The following issues were found in Gopkg.toml:
                
                  ✗ github.com/sdboyer/deptest is not a valid path for a source on github.com
                
                ProjectRoot name validation failed
    --- FAIL: TestIntegration/ensure/add/all-new-spec (0.00s)
        --- FAIL: TestIntegration/ensure/add/all-new-spec/external (0.52s)
            integration_test.go:194: cmd init raised an unexpected error: exit status 1
    --- FAIL: TestIntegration/ensure/add/all-new-double-spec (0.00s)
        --- FAIL: TestIntegration/ensure/add/all-new-double-spec/external (10.86s)
            integration_test.go:199: exit status 2
            testcase.go:187: expected command not to fail, but it did
            testcase.go:171: error raised where none was expected: 
                panic: runtime error: invalid memory address or nil pointer dereference
                [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x7f92a5123840]
                
                goroutine 9 [running]:
                regexp.(*Regexp).FindStringSubmatch(0xc0003a4900, 0xc000447000, 0x1e, 0x56192f902980, 0xc0003a4900, 0x56192f8d7e80)
                	/usr/lib64/go/src/regexp/regexp.go:982 +0x50
                github.com/golang/dep/gps.githubDeducer.deduceRoot(0xc0003a4900, 0xc000447000, 0x1e, 0x56192f803add, 0xb, 0x56192f902980, 0xc0003a4900)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/deduce.go:115 +0x45
                github.com/golang/dep/gps.(*deductionCoordinator).deduceKnownPaths(0xc00045b890, 0xc000447000, 0x1e, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000325260, 0xc000325278)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/deduce.go:668 +0x107
                github.com/golang/dep/gps.(*deductionCoordinator).deduceRootPath(0xc00045b890, 0x56192f904f00, 0xc0003280f8, 0xc000447000, 0x1e, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/deduce.go:608 +0x35b
                github.com/golang/dep/gps.(*SourceMgr).DeduceProjectRoot(0xc000324fc0, 0xc000447000, 0x1e, 0x0, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/source_manager.go:595 +0xf4
                github.com/golang/dep.ValidateProjectRoots.func1(0xc000447000, 0x1e)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:306 +0xab
                created by github.com/golang/dep.ValidateProjectRoots
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/manifest.go:316 +0x1b2
    --- FAIL: TestIntegration/ensure/add/all-new-double (0.00s)
        --- FAIL: TestIntegration/ensure/add/all-new-double/external (0.52s)
            integration_test.go:194: cmd init raised an unexpected error: exit status 1
    --- FAIL: TestIntegration/ensure/add/all-new (0.00s)
        --- FAIL: TestIntegration/ensure/add/all-new/external (1.15s)
            integration_test.go:194: cmd init raised an unexpected error: exit status 1
    --- FAIL: TestIntegration/check/vendororphans (0.00s)
        --- FAIL: TestIntegration/check/vendororphans/external (0.57s)
            integration_test.go:199: exit status 2
            testcase.go:171: error raised where none was expected: 
                panic: runtime error: invalid memory address or nil pointer dereference
                [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x7fae71d4b840]
                
                goroutine 1 [running]:
                regexp.(*Regexp).FindStringSubmatch(0xc0003a4240, 0xc0004328a0, 0x6, 0x6, 0x7fae7345a460, 0x7fae71968a00)
                	/usr/lib64/go/src/regexp/regexp.go:982 +0x50
                github.com/golang/dep/vendor/github.com/Masterminds/semver.NewVersion(0xc0004328a0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/version.go:81 +0x165
                github.com/golang/dep/gps.NewVersion(...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/version.go:107
                github.com/golang/dep.fromRawLock(0xc000432942, 0x3, 0x1, 0xc0004337d8, 0x8, 0x1, 0xc0000137a0, 0x1, 0x1, 0xc0003a4240, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/lock.go:96 +0x2a3
                github.com/golang/dep.readLock(0x5604f5176c20, 0xc000212060, 0xc000212060, 0xc000000000, 0xc000212060)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/lock.go:74 +0x1d2
                github.com/golang/dep.(*Ctx).LoadProject(0xc0003a8980, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/context.go:189 +0x517
                main.(*checkCommand).Run(0xc000433746, 0xc0003a8980, 0xc00000f800, 0x0, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/check.go:67 +0x6d
                main.(*Config).Run(0xc000364f60, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:212 +0x115d
                main.main()
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:84 +0x69a
    --- FAIL: TestIntegration/check/unmet_override (0.00s)
        --- FAIL: TestIntegration/check/unmet_override/external (1.11s)
            integration_test.go:199: exit status 2
            testcase.go:171: error raised where none was expected: 
                panic: runtime error: makeslice: len out of range
                
                goroutine 1 [running]:
                regexp.(*Regexp).doOnePass(0xc0003a4240, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000433840, 0x6, 0x0, 0x616c6f672f6d6f63, ...)
                	/usr/lib64/go/src/regexp/exec.go:405 +0x9a8
                regexp.(*Regexp).doExecute(0xc0003a4240, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000433840, 0x6, 0x0, 0x616c6f672f6d6f63, ...)
                	/usr/lib64/go/src/regexp/exec.go:528 +0x51d
                regexp.(*Regexp).FindStringSubmatch(0xc0003a4240, 0xc000433840, 0x6, 0x6, 0x7f6048804460, 0x7f6046d12a00)
                	/usr/lib64/go/src/regexp/regexp.go:982 +0xb7
                github.com/golang/dep/vendor/github.com/Masterminds/semver.NewVersion(0xc000433840, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/version.go:81 +0x165
                github.com/golang/dep/gps.NewVersion(...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/version.go:107
                github.com/golang/dep.fromRawLock(0xc0004338e2, 0x3, 0x1, 0xc000433b68, 0x8, 0x1, 0xc0003cc350, 0x1, 0x1, 0xc0003a43f0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/lock.go:96 +0x2a3
                github.com/golang/dep.readLock(0x55e2415ebc20, 0xc000212088, 0xc000212088, 0xc000000000, 0xc000212088)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/lock.go:74 +0x1d2
                github.com/golang/dep.(*Ctx).LoadProject(0xc0003a8080, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/context.go:189 +0x517
                main.(*checkCommand).Run(0xc00043225c, 0xc0003a8080, 0xc00000e800, 0x0, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/check.go:67 +0x6d
                main.(*Config).Run(0xc0003642a0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:212 +0x115d
                main.main()
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:84 +0x69a
    --- FAIL: TestIntegration/check/unmet_constraint (0.00s)
        --- FAIL: TestIntegration/check/unmet_constraint/external (1.13s)
            integration_test.go:199: exit status 2
            testcase.go:171: error raised where none was expected: 
                panic: runtime error: invalid memory address or nil pointer dereference
                [signal SIGSEGV: segmentation violation code=0x1 addr=0x3a pc=0x7f811accf840]
                
                goroutine 1 [running]:
                regexp.(*Regexp).FindStringSubmatch(0xc0003a4240, 0xc00043d830, 0x6, 0x6, 0x7f811c3de460, 0x7f811a8eca00)
                	/usr/lib64/go/src/regexp/regexp.go:982 +0x50
                github.com/golang/dep/vendor/github.com/Masterminds/semver.NewVersion(0xc00043d830, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/version.go:81 +0x165
                github.com/golang/dep/gps.NewVersion(...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/version.go:107
                github.com/golang/dep.fromRawLock(0xc00043d8d2, 0x3, 0x1, 0xc00043db58, 0x8, 0x1, 0xc000436350, 0x1, 0x1, 0xc0003a42d0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/lock.go:96 +0x2a3
                github.com/golang/dep.readLock(0x56079f563c20, 0xc000212078, 0xc000212078, 0xc000000000, 0xc000212078)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/lock.go:74 +0x1d2
                github.com/golang/dep.(*Ctx).LoadProject(0xc0003a8000, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/context.go:189 +0x517
                main.(*checkCommand).Run(0xc00043c00a, 0xc0003a8000, 0xc00000e020, 0x0, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/check.go:67 +0x6d
                main.(*Config).Run(0xc0003641e0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:212 +0x115d
                main.main()
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:84 +0x69a
    --- FAIL: TestIntegration/check/noverify/vendororphans (0.00s)
        --- FAIL: TestIntegration/check/noverify/vendororphans/external (0.91s)
            integration_test.go:199: exit status 2
            testcase.go:171: error raised where none was expected: 
                panic: runtime error: invalid memory address or nil pointer dereference
                [signal SIGSEGV: segmentation violation code=0x1 addr=0x3a pc=0x7f0deda3e840]
                
                goroutine 1 [running]:
                regexp.(*Regexp).FindStringSubmatch(0xc0003a4240, 0xc000433750, 0x6, 0x6, 0x7f0def14d460, 0x7f0ded65ba00)
                	/usr/lib64/go/src/regexp/regexp.go:982 +0x50
                github.com/golang/dep/vendor/github.com/Masterminds/semver.NewVersion(0xc000433750, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/version.go:81 +0x165
                github.com/golang/dep/gps.NewVersion(...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/version.go:107
                github.com/golang/dep.fromRawLock(0xc0004337f2, 0x3, 0x1, 0xc000433a78, 0x8, 0x1, 0xc00044a070, 0x1, 0x1, 0xc0003a42d0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/lock.go:96 +0x2a3
                github.com/golang/dep.readLock(0x55dbb8f27c20, 0xc000212060, 0xc000212060, 0xc000000000, 0xc000212060)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/lock.go:74 +0x1d2
                github.com/golang/dep.(*Ctx).LoadProject(0xc0003a8000, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/context.go:189 +0x517
                main.(*checkCommand).Run(0xc00043200a, 0xc0003a8000, 0xc00000e020, 0x0, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/check.go:67 +0x6d
                main.(*Config).Run(0xc0003641e0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:212 +0x115d
                main.main()
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:84 +0x69a
    --- FAIL: TestIntegration/check/noverify/unmet_override (0.00s)
        --- FAIL: TestIntegration/check/noverify/unmet_override/external (0.86s)
            integration_test.go:199: exit status 2
            testcase.go:171: error raised where none was expected: 
                panic: runtime error: makeslice: len out of range
                
                goroutine 1 [running]:
                regexp.(*Regexp).doOnePass(0xc0003a4240, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000433ac0, 0x6, 0x0, 0x616c6f672f6d6f63, ...)
                	/usr/lib64/go/src/regexp/exec.go:405 +0x9a8
                regexp.(*Regexp).doExecute(0xc0003a4240, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000433ac0, 0x6, 0x0, 0x616c6f672f6d6f63, ...)
                	/usr/lib64/go/src/regexp/exec.go:528 +0x51d
                regexp.(*Regexp).FindStringSubmatch(0xc0003a4240, 0xc000433ac0, 0x6, 0x6, 0x7fc38b4da460, 0x7fc3899e8a00)
                	/usr/lib64/go/src/regexp/regexp.go:982 +0xb7
                github.com/golang/dep/vendor/github.com/Masterminds/semver.NewVersion(0xc000433ac0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/version.go:81 +0x165
                github.com/golang/dep/gps.NewVersion(...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/version.go:107
                github.com/golang/dep.fromRawLock(0xc000433b62, 0x3, 0x1, 0xc000433de8, 0x8, 0x1, 0xc000434660, 0x1, 0x1, 0xc0003a43f0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/lock.go:96 +0x2a3
                github.com/golang/dep.readLock(0x5577c6ef0c20, 0xc000212088, 0xc000212088, 0xc000000000, 0xc000212088)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/lock.go:74 +0x1d2
                github.com/golang/dep.(*Ctx).LoadProject(0xc0003a8080, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/context.go:189 +0x517
                main.(*checkCommand).Run(0xc00043225c, 0xc0003a8080, 0xc00000e8a0, 0x0, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/check.go:67 +0x6d
                main.(*Config).Run(0xc0003642a0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:212 +0x115d
                main.main()
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:84 +0x69a
    --- FAIL: TestIntegration/check/noverify/unmet_constraint (0.00s)
        --- FAIL: TestIntegration/check/noverify/unmet_constraint/external (0.89s)
            integration_test.go:199: exit status 2
            testcase.go:171: error raised where none was expected: 
                panic: runtime error: makeslice: len out of range
                
                goroutine 1 [running]:
                regexp.(*Regexp).doOnePass(0xc0003a4240, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000433ac0, 0x6, 0x0, 0x616c6f672f6d6f63, ...)
                	/usr/lib64/go/src/regexp/exec.go:405 +0x9a8
                regexp.(*Regexp).doExecute(0xc0003a4240, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000433ac0, 0x6, 0x0, 0x616c6f672f6d6f63, ...)
                	/usr/lib64/go/src/regexp/exec.go:528 +0x51d
                regexp.(*Regexp).FindStringSubmatch(0xc0003a4240, 0xc000433ac0, 0x6, 0x6, 0x7f9eb56ff460, 0x7f9eb3c0da00)
                	/usr/lib64/go/src/regexp/regexp.go:982 +0xb7
                github.com/golang/dep/vendor/github.com/Masterminds/semver.NewVersion(0xc000433ac0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/version.go:81 +0x165
                github.com/golang/dep/gps.NewVersion(...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/version.go:107
                github.com/golang/dep.fromRawLock(0xc000433b62, 0x3, 0x1, 0xc000433de8, 0x8, 0x1, 0xc0003cc650, 0x1, 0x1, 0xc0003a43f0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/lock.go:96 +0x2a3
                github.com/golang/dep.readLock(0x55df8ffa6c20, 0xc000212080, 0xc000212080, 0xc000000000, 0xc000212080)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/lock.go:74 +0x1d2
                github.com/golang/dep.(*Ctx).LoadProject(0xc0003a8080, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/context.go:189 +0x517
                main.(*checkCommand).Run(0xc00043212c, 0xc0003a8080, 0xc00000e2e0, 0x0, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/check.go:67 +0x6d
                main.(*Config).Run(0xc000364240, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:212 +0x115d
                main.main()
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:84 +0x69a
    --- FAIL: TestIntegration/check/noverify/hash_version_mismatch (0.00s)
        --- FAIL: TestIntegration/check/noverify/hash_version_mismatch/external (0.82s)
            integration_test.go:199: exit status 2
            testcase.go:187: expected command not to fail, but it did
            testcase.go:171: error raised where none was expected: 
                panic: runtime error: invalid memory address or nil pointer dereference
                [signal SIGSEGV: segmentation violation code=0x1 addr=0x3a pc=0x7f6c22597840]
                
                goroutine 1 [running]:
                regexp.(*Regexp).FindStringSubmatch(0xc0003a4240, 0xc000433750, 0x6, 0x6, 0x7f6c23ca6460, 0x7f6c221b4a00)
                	/usr/lib64/go/src/regexp/regexp.go:982 +0x50
                github.com/golang/dep/vendor/github.com/Masterminds/semver.NewVersion(0xc000433750, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/version.go:81 +0x165
                github.com/golang/dep/gps.NewVersion(...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/version.go:107
                github.com/golang/dep.fromRawLock(0xc0004337f2, 0x3, 0x1, 0xc000433a78, 0x8, 0x1, 0xc000442060, 0x1, 0x1, 0xc0003a42d0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/lock.go:96 +0x2a3
                github.com/golang/dep.readLock(0x55b91a38fc20, 0xc000212060, 0xc000212060, 0xc000000000, 0xc000212060)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/lock.go:74 +0x1d2
                github.com/golang/dep.(*Ctx).LoadProject(0xc0003a8000, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/context.go:189 +0x517
                main.(*checkCommand).Run(0xc00043200c, 0xc0003a8000, 0xc00000e260, 0x0, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/check.go:67 +0x6d
                main.(*Config).Run(0xc0003641e0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:212 +0x115d
                main.main()
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:84 +0x69a
    --- FAIL: TestIntegration/check/hash_version_mismatch (0.00s)
        --- FAIL: TestIntegration/check/hash_version_mismatch/external (0.67s)
            integration_test.go:199: exit status 2
            testcase.go:171: error raised where none was expected: 
                panic: runtime error: invalid memory address or nil pointer dereference
                [signal SIGSEGV: segmentation violation code=0x1 addr=0x3a pc=0x7fd7cae2b840]
                
                goroutine 1 [running]:
                regexp.(*Regexp).FindStringSubmatch(0xc0003a4240, 0xc0004328f0, 0x6, 0x6, 0x7fd7cc53a460, 0x7fd7caa48a00)
                	/usr/lib64/go/src/regexp/regexp.go:982 +0x50
                github.com/golang/dep/vendor/github.com/Masterminds/semver.NewVersion(0xc0004328f0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/version.go:81 +0x165
                github.com/golang/dep/gps.NewVersion(...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/version.go:107
                github.com/golang/dep.fromRawLock(0xc000432992, 0x3, 0x1, 0xc0004337d8, 0x8, 0x1, 0xc000013870, 0x1, 0x1, 0xc0003a42d0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/lock.go:96 +0x2a3
                github.com/golang/dep.readLock(0x55be4a286c20, 0xc000212060, 0xc000212060, 0xc000000000, 0xc000212060)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/lock.go:74 +0x1d2
                github.com/golang/dep.(*Ctx).LoadProject(0xc0003a8000, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/context.go:189 +0x517
                main.(*checkCommand).Run(0xc00043200c, 0xc0003a8000, 0xc00000e1a0, 0x0, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/check.go:67 +0x6d
                main.(*Config).Run(0xc0003641e0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:212 +0x115d
                main.main()
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:84 +0x69a
    --- FAIL: TestIntegration/check/hash_mismatch (0.00s)
        --- FAIL: TestIntegration/check/hash_mismatch/external (0.62s)
            integration_test.go:199: exit status 2
            testcase.go:171: error raised where none was expected: 
                panic: runtime error: invalid memory address or nil pointer dereference
                [signal SIGSEGV: segmentation violation code=0x1 addr=0x3a pc=0x7fad77912840]
                
                goroutine 1 [running]:
                regexp.(*Regexp).FindStringSubmatch(0xc0003a4240, 0xc0004328d0, 0x6, 0x6, 0x7fad79021460, 0x7fad7752fa00)
                	/usr/lib64/go/src/regexp/regexp.go:982 +0x50
                github.com/golang/dep/vendor/github.com/Masterminds/semver.NewVersion(0xc0004328d0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/vendor/github.com/Masterminds/semver/version.go:81 +0x165
                github.com/golang/dep/gps.NewVersion(...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/gps/version.go:107
                github.com/golang/dep.fromRawLock(0xc000432972, 0x3, 0x1, 0xc0004337d8, 0x8, 0x1, 0xc0000137b0, 0x1, 0x1, 0xc0003a42d0, ...)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/lock.go:96 +0x2a3
                github.com/golang/dep.readLock(0x55c5ba926c20, 0xc000212060, 0xc000212060, 0xc000000000, 0xc000212060)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/lock.go:74 +0x1d2
                github.com/golang/dep.(*Ctx).LoadProject(0xc0003a8000, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/context.go:189 +0x517
                main.(*checkCommand).Run(0xc000433746, 0xc0003a8000, 0xc00000f820, 0x0, 0x0, 0x0, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/check.go:67 +0x6d
                main.(*Config).Run(0xc000364f00, 0x0)
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:212 +0x115d
                main.main()
                	/yocto/build/tmp/work/core2-64-wrs-linux/go-dep/0.5.0-r0/build/src/github.com/golang/dep/cmd/dep/main.go:84 +0x69a
FAIL: github.com/golang/dep/cmd/dep/dep.test

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v5 06/13] go.bbclass: ptest cleanup and improvements
  2019-06-27  6:43           ` Yu, Mingli
@ 2019-06-27 11:34             ` Matt Madison
  2019-06-28  7:12               ` Yu, Mingli
  0 siblings, 1 reply; 22+ messages in thread
From: Matt Madison @ 2019-06-27 11:34 UTC (permalink / raw)
  To: Yu, Mingli; +Cc: Patches and discussions about the oe-core layer

On Wed, Jun 26, 2019 at 11:40 PM Yu, Mingli <mingli.yu@windriver.com> wrote:
>
>
>
> On 2019年06月26日 22:00, Matt Madison wrote:
> > On Wed, Jun 26, 2019 at 2:02 AM Yu, Mingli <mingli.yu@windriver.com> wrote:
> >>
> >>
> >>
> >> On 2019年06月25日 20:23, Matt Madison wrote:
> >>> On Fri, Jun 21, 2019 at 2:08 AM Yu, Mingli <mingli.yu@windriver.com> wrote:
> >>>>
> >>>> Hi Matt,
> >>>>
> >>>> I noticed your commit is the latest update for go-dep ptest. But the
> >>>> go-dep ptest doesn't work in my environment. I'm trying to figure out
> >>>> what's wrong is here though I didn't know much about go.
> >>>
> >>> I went back over the commits, and I don't think I did anything with
> >>> go-dep specifically. I can see that the tests are failing for it, and
> >>> it looks like it's because go-dep's test programs make some
> >>> assumptions about the environment.  For one thing, it needs the go
> >>> compiler installed. It also looks like it's expecting some source
> >>> files to be present... in other words, it's not really designed for a
> >>> cross-build setup, with tests run on the cross-built target. It could
> >>> be messy to work around that, and I'm not sure how useful it would be
> >>> anyway, seeing as how go-dep is more of a build tool.  Might be better
> >>> to just disable ptests for it completely.
> >>
> >> Many thanks Matt for your information!
> >> Did you ever run go-dep ptest?
> >> Go through the run-ptest script for go-dep, it actually runs the
> >> /usr/lib64/go-dep/ptest/github.com/golang/dep/cmd/dep/dep.test whose
> >> source file is
> >> https://github.com/golang/dep/blob/master/cmd/dep/dep_test.go.
> >
> > Yes, I see that.  That main program starts by rebuilding the dep
> > program from source, then runs the tests using that copy of the
> > program, so it's assuming that you're still in a development
> > environment where you can run a full go build.  That's what I meant by
> > it not being designed for a cross-build setup.
> >
> > I've patched the test program to create a symlink to the installed dep
> > program instead of rebuilding, and got further.  You'll need to
> > include 'go', 'git', and 'git-perltools' in the image to get the tests
> > to run. Some of the test cases failed until I set GOCACHE in the
> > environment to point to a valid path; I'm not sure why.  The tests
> > took a long time to run on my qemux86 build, though - at least 30
> > minutes.
>
> Thanks very much for Matt's guide!
>
> I have applied the patch you provide to create a symlink to the
> installed dep program instead of rebuilding and also add go', 'git', and
> 'git-perltools' into the image, but there is no PASS case, all failed as
> attached go-dep_ptest.log.

The device under test needs Internet access to fetch repos from
Github. From the log, it looks like perhaps yours didn't?

>
> BTW, you said you set GOCACHE, what's the valid path do you mean?

Any directory that the user has write access to.  The default is
$HOME/.cache/go-build .

-M

>
> Thanks,
>
> >
> > Here's the patch I applied to use the already-built dep binary.  An
> > alternative approach would be to put everything in place to allow the
> > test program to rebuild the dep binary itself, but that would drive up
> > the time for the test run even further.
> >
> > Regards,
> > -Matt
> >
> > ---
> >   cmd/dep/dep_test.go | 13 +++++++++----
> >   1 file changed, 9 insertions(+), 4 deletions(-)
> >
> > diff --git a/src/github.com/golang/dep/cmd/dep/dep_test.go
> > b/src/github.com/golang/dep/cmd/dep/dep_test.go
> > index 687eef3a..535ca56d 100644
> > --- a/src/github.com/golang/dep/cmd/dep/dep_test.go
> > +++ b/src/github.com/golang/dep/cmd/dep/dep_test.go
> > @@ -18,13 +18,18 @@ import (
> >   // deletes it after the tests have been run.
> >   // Most of this is taken from
> > https://github.com/golang/go/blob/master/src/cmd/go/go_test.go and
> > reused here.
> >   func TestMain(m *testing.M) {
> > - args := []string{"build", "-o", "testdep" + test.ExeSuffix}
> > - out, err := exec.Command("go", args...).CombinedOutput()
> > + args := []string{"dep"}
> > + out, err := exec.Command("which", args...).CombinedOutput()
> >    if err != nil {
> > - fmt.Fprintf(os.Stderr, "building testdep failed: %v\n%s", err, out)
> > + fmt.Fprintf(os.Stderr, "finding dep failed: %v\n%s", err, out)
> > + os.Exit(2)
> > + }
> > + args = []string{"-s", string(out[:len(out)-1]), "testdep" + test.ExeSuffix}
> > + out, err = exec.Command("ln", args...).CombinedOutput()
> > + if err != nil {
> > + fmt.Fprintf(os.Stderr, "symlinking dep failed: %v\n%s", err, out)
> >    os.Exit(2)
> >    }
> > -
> >    // Don't let these environment variables confuse the test.
> >    os.Unsetenv("GOPATH")
> >    os.Unsetenv("GIT_ALLOW_PROTOCOL")
> >


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v5 06/13] go.bbclass: ptest cleanup and improvements
  2019-06-27 11:34             ` Matt Madison
@ 2019-06-28  7:12               ` Yu, Mingli
  0 siblings, 0 replies; 22+ messages in thread
From: Yu, Mingli @ 2019-06-28  7:12 UTC (permalink / raw)
  To: Matt Madison; +Cc: Patches and discussions about the oe-core layer



On 2019年06月27日 19:34, Matt Madison wrote:
> On Wed, Jun 26, 2019 at 11:40 PM Yu, Mingli <mingli.yu@windriver.com> wrote:
>>
>>
>>
>> On 2019年06月26日 22:00, Matt Madison wrote:
>>> On Wed, Jun 26, 2019 at 2:02 AM Yu, Mingli <mingli.yu@windriver.com> wrote:
>>>>
>>>>
>>>>
>>>> On 2019年06月25日 20:23, Matt Madison wrote:
>>>>> On Fri, Jun 21, 2019 at 2:08 AM Yu, Mingli <mingli.yu@windriver.com> wrote:
>>>>>>
>>>>>> Hi Matt,
>>>>>>
>>>>>> I noticed your commit is the latest update for go-dep ptest. But the
>>>>>> go-dep ptest doesn't work in my environment. I'm trying to figure out
>>>>>> what's wrong is here though I didn't know much about go.
>>>>>
>>>>> I went back over the commits, and I don't think I did anything with
>>>>> go-dep specifically. I can see that the tests are failing for it, and
>>>>> it looks like it's because go-dep's test programs make some
>>>>> assumptions about the environment.  For one thing, it needs the go
>>>>> compiler installed. It also looks like it's expecting some source
>>>>> files to be present... in other words, it's not really designed for a
>>>>> cross-build setup, with tests run on the cross-built target. It could
>>>>> be messy to work around that, and I'm not sure how useful it would be
>>>>> anyway, seeing as how go-dep is more of a build tool.  Might be better
>>>>> to just disable ptests for it completely.
>>>>
>>>> Many thanks Matt for your information!
>>>> Did you ever run go-dep ptest?
>>>> Go through the run-ptest script for go-dep, it actually runs the
>>>> /usr/lib64/go-dep/ptest/github.com/golang/dep/cmd/dep/dep.test whose
>>>> source file is
>>>> https://github.com/golang/dep/blob/master/cmd/dep/dep_test.go.
>>>
>>> Yes, I see that.  That main program starts by rebuilding the dep
>>> program from source, then runs the tests using that copy of the
>>> program, so it's assuming that you're still in a development
>>> environment where you can run a full go build.  That's what I meant by
>>> it not being designed for a cross-build setup.
>>>
>>> I've patched the test program to create a symlink to the installed dep
>>> program instead of rebuilding, and got further.  You'll need to
>>> include 'go', 'git', and 'git-perltools' in the image to get the tests
>>> to run. Some of the test cases failed until I set GOCACHE in the
>>> environment to point to a valid path; I'm not sure why.  The tests
>>> took a long time to run on my qemux86 build, though - at least 30
>>> minutes.
>>
>> Thanks very much for Matt's guide!
>>
>> I have applied the patch you provide to create a symlink to the
>> installed dep program instead of rebuilding and also add go', 'git', and
>> 'git-perltools' into the image, but there is no PASS case, all failed as
>> attached go-dep_ptest.log.
>
> The device under test needs Internet access to fetch repos from
> Github. From the log, it looks like perhaps yours didn't?
>
>>
>> BTW, you said you set GOCACHE, what's the valid path do you mean?
>
> Any directory that the user has write access to.  The default is
> $HOME/.cache/go-build .

There is no difference after set GOCACHE, still all the case failed.

Thanks,

>
> -M
>
>>
>> Thanks,
>>
>>>
>>> Here's the patch I applied to use the already-built dep binary.  An
>>> alternative approach would be to put everything in place to allow the
>>> test program to rebuild the dep binary itself, but that would drive up
>>> the time for the test run even further.
>>>
>>> Regards,
>>> -Matt
>>>
>>> ---
>>>    cmd/dep/dep_test.go | 13 +++++++++----
>>>    1 file changed, 9 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/src/github.com/golang/dep/cmd/dep/dep_test.go
>>> b/src/github.com/golang/dep/cmd/dep/dep_test.go
>>> index 687eef3a..535ca56d 100644
>>> --- a/src/github.com/golang/dep/cmd/dep/dep_test.go
>>> +++ b/src/github.com/golang/dep/cmd/dep/dep_test.go
>>> @@ -18,13 +18,18 @@ import (
>>>    // deletes it after the tests have been run.
>>>    // Most of this is taken from
>>> https://github.com/golang/go/blob/master/src/cmd/go/go_test.go and
>>> reused here.
>>>    func TestMain(m *testing.M) {
>>> - args := []string{"build", "-o", "testdep" + test.ExeSuffix}
>>> - out, err := exec.Command("go", args...).CombinedOutput()
>>> + args := []string{"dep"}
>>> + out, err := exec.Command("which", args...).CombinedOutput()
>>>     if err != nil {
>>> - fmt.Fprintf(os.Stderr, "building testdep failed: %v\n%s", err, out)
>>> + fmt.Fprintf(os.Stderr, "finding dep failed: %v\n%s", err, out)
>>> + os.Exit(2)
>>> + }
>>> + args = []string{"-s", string(out[:len(out)-1]), "testdep" + test.ExeSuffix}
>>> + out, err = exec.Command("ln", args...).CombinedOutput()
>>> + if err != nil {
>>> + fmt.Fprintf(os.Stderr, "symlinking dep failed: %v\n%s", err, out)
>>>     os.Exit(2)
>>>     }
>>> -
>>>     // Don't let these environment variables confuse the test.
>>>     os.Unsetenv("GOPATH")
>>>     os.Unsetenv("GIT_ALLOW_PROTOCOL")
>>>
>


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2019-06-28  7:08 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-04 21:09 [PATCH v5 00/13] go1.10 update and misc improvements Matt Madison
2018-03-04 21:09 ` [PATCH v5 01/13] go: update go 1.9 -> go 1.10 Matt Madison
2018-03-04 21:09 ` [PATCH v5 02/13] go: set GOMIPS envrionment variable Matt Madison
2018-03-04 21:09 ` [PATCH v5 03/13] go.bbclass: rename GO_TMPDIR -> GOTMPDIR Matt Madison
2018-03-04 21:09 ` [PATCH v5 04/13] go.bbclass: remove debug-related commands Matt Madison
2018-03-04 21:09 ` [PATCH v5 05/13] go.bbclass: don't stage test data with sources Matt Madison
2018-03-04 21:09 ` [PATCH v5 06/13] go.bbclass: ptest cleanup and improvements Matt Madison
2019-06-21  9:12   ` Yu, Mingli
2019-06-25 12:23     ` Matt Madison
2019-06-26  9:06       ` Yu, Mingli
2019-06-26 14:00         ` Matt Madison
2019-06-27  6:43           ` Yu, Mingli
2019-06-27 11:34             ` Matt Madison
2019-06-28  7:12               ` Yu, Mingli
2018-03-04 21:09 ` [PATCH v5 07/13] goarch.bbclass: disable shared runtime for nativesdk builds Matt Madison
2018-03-04 21:09 ` [PATCH v5 08/13] go: move common settings to go-common.inc Matt Madison
2018-03-04 21:09 ` [PATCH v5 09/13] go.bbclass, goarch.bbclass: update SECURITY_CFLAGS Matt Madison
2018-03-04 21:09 ` [PATCH v5 10/13] go: disable PIE CFLAGS for nativesdk and cross-canadian builds Matt Madison
2018-03-04 21:09 ` [PATCH v5 11/13] packagegroup-go-sdk-target: add go-runtime-staticdev Matt Madison
2018-03-04 21:09 ` [PATCH v5 12/13] go-runtime: remove unneeded nativesdk override, rename variable Matt Madison
2018-03-04 21:09 ` [PATCH v5 13/13] tcmode-default.inc: add settings for go Matt Madison
2018-03-04 21:34 ` ✗ patchtest: failure for go1.10 update and misc improvements (rev5) Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox