Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/2] Add go-bin virtual package to go providers
@ 2024-09-14 15:23 Thomas Perale via buildroot
  2024-09-14 15:23 ` [Buildroot] [PATCH 1/2] package/go/go-bin: new host-go provider Thomas Perale via buildroot
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Thomas Perale via buildroot @ 2024-09-14 15:23 UTC (permalink / raw)
  To: buildroot
  Cc: Christian Stewart, Yann E . MORIN, Anisse Astier,
	Thomas Petazzoni, Thomas Perale

Previous patch set adding 'go-bin' failed the tests in newer go version
because of illegal instructions.

This patch set fix the cross-compilation issue coming from the 'go-bin'
this was solved by specifically mentionning the GOARM version in
environment variable when building a go package for the target
(`HOST_GO_TARGET_ENV`).

Thomas Perale (2):
  package/go/go-bin: new host-go provider
  support/testing: add tests for Go providers

 package/go/Config.in.host                | 22 ++++++++++++++++------
 package/go/go-bin/Config.in.host         | 13 +++++++++++++
 package/go/go-bin/go-bin.hash            |  8 ++++++++
 package/go/go-bin/go-bin.mk              | 20 ++++++++++++++++++++
 package/go/go.mk                         |  2 ++
 support/testing/tests/package/test_go.py | 14 ++++++++++++++
 6 files changed, 73 insertions(+), 6 deletions(-)
 create mode 100644 package/go/go-bin/Config.in.host
 create mode 100644 package/go/go-bin/go-bin.hash
 create mode 100644 package/go/go-bin/go-bin.mk

-- 
2.46.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 1/2] package/go/go-bin: new host-go provider
  2024-09-14 15:23 [Buildroot] [PATCH 0/2] Add go-bin virtual package to go providers Thomas Perale via buildroot
@ 2024-09-14 15:23 ` Thomas Perale via buildroot
  2024-09-15 14:14   ` Yann E. MORIN
  2024-09-14 15:23 ` [Buildroot] [PATCH 2/2] support/testing: add tests for Go providers Thomas Perale via buildroot
  2024-09-15 14:18 ` [Buildroot] [PATCH 0/2] Add go-bin virtual package to go providers Yann E. MORIN
  2 siblings, 1 reply; 6+ messages in thread
From: Thomas Perale via buildroot @ 2024-09-14 15:23 UTC (permalink / raw)
  To: buildroot
  Cc: Christian Stewart, Yann E . MORIN, Anisse Astier,
	Thomas Petazzoni, Thomas Perale

This package provides a pre-built version for the host-go virtual
package introduced in the previous commits:

 - host-go-bin installs a pre-built version of the Go compiler.

By default, host-go remains built from sources to keep the same
behavior as the former version.

The menuconfig entry for host-go is updated to expose the host-go-bin
provider. The dependencies are set as such as if host-go-src does not
support the host architecture, it will automatically fall back to
host-go-bin and vice versa.

Signed-off-by: Thomas Perale <thomas.perale@mind.be>
---
 package/go/Config.in.host        | 22 ++++++++++++++++------
 package/go/go-bin/Config.in.host | 13 +++++++++++++
 package/go/go-bin/go-bin.hash    |  8 ++++++++
 package/go/go-bin/go-bin.mk      | 20 ++++++++++++++++++++
 package/go/go.mk                 |  2 ++
 5 files changed, 59 insertions(+), 6 deletions(-)
 create mode 100644 package/go/go-bin/Config.in.host
 create mode 100644 package/go/go-bin/go-bin.hash
 create mode 100644 package/go/go-bin/go-bin.mk

diff --git a/package/go/Config.in.host b/package/go/Config.in.host
index eefca03b02..435faec555 100644
--- a/package/go/Config.in.host
+++ b/package/go/Config.in.host
@@ -34,7 +34,7 @@ config BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
 config BR2_PACKAGE_HOST_GO_HOST_ARCH_SUPPORTS
 	bool
 	default y
-	depends on BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE3_ARCH_SUPPORTS
+	depends on BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE3_ARCH_SUPPORTS || BR2_PACKAGE_HOST_GO_BIN_HOST_ARCH_SUPPORTS
 
 # CGO linking for the host. Since we use the same compiler for target
 # and host, if the target can't do CGO linking, then the host can't.
@@ -57,7 +57,8 @@ if BR2_PACKAGE_HOST_GO
 
 choice
 	prompt "Go compiler variant"
-	default BR2_PACKAGE_HOST_GO_SRC
+	default BR2_PACKAGE_HOST_GO_SRC if BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE3_ARCH_SUPPORTS
+	default BR2_PACKAGE_HOST_GO_BIN if BR2_PACKAGE_HOST_GO_BIN_HOST_ARCH_SUPPORTS
 	help
 	  Select a Go compiler variant.
 
@@ -65,18 +66,27 @@ choice
 
 config BR2_PACKAGE_HOST_GO_SRC
 	bool "host go (source)"
+	depends on BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE3_ARCH_SUPPORTS
 	help
 	  This package will build the go compiler for the host.
 
-endchoice
+config BR2_PACKAGE_HOST_GO_BIN
+	bool "host go (pre-built)"
+	depends on BR2_PACKAGE_HOST_GO_BIN_HOST_ARCH_SUPPORTS
+	help
+	  This package will install pre-built versions of the compiler
 
-endif
+endchoice
 
 config BR2_PACKAGE_PROVIDES_HOST_GO
 	string
-	# Default to host-go-src, as the only provider for now
-	default "host-go-src"
+	# Default to host-go-src
+	default "host-go-src" if BR2_PACKAGE_HOST_GO_SRC
+	default "host-go-bin" if BR2_PACKAGE_HOST_GO_BIN
+
+endif
 
+source "package/go/go-bin/Config.in.host"
 source "package/go/go-bootstrap-stage1/Config.in.host"
 source "package/go/go-bootstrap-stage2/Config.in.host"
 source "package/go/go-bootstrap-stage3/Config.in.host"
diff --git a/package/go/go-bin/Config.in.host b/package/go/go-bin/Config.in.host
new file mode 100644
index 0000000000..51fe3c3fdc
--- /dev/null
+++ b/package/go/go-bin/Config.in.host
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_HOST_GO_BIN_HOST_ARCH
+	string "Translate the HOSTARCH into the architecture name used by the Go compiler"
+	default "armv6l" if BR2_HOSTARCH = "arm"
+	default "arm64" if BR2_HOSTARCH = "aarch64"
+	default "ppc64le" if BR2_HOSTARCH = "powerpc64le"
+	default "s390x" if BR2_HOSTARCH = "s390x"
+	default "386" if BR2_HOSTARCH = "x86"
+	default "amd64" if BR2_HOSTARCH = "x86_64"
+
+config BR2_PACKAGE_HOST_GO_BIN_HOST_ARCH_SUPPORTS
+	bool
+	default y
+	depends on BR2_PACKAGE_HOST_GO_BIN_HOST_ARCH != ""
diff --git a/package/go/go-bin/go-bin.hash b/package/go/go-bin/go-bin.hash
new file mode 100644
index 0000000000..12fd4c2816
--- /dev/null
+++ b/package/go/go-bin/go-bin.hash
@@ -0,0 +1,8 @@
+# sha256 checksum from https://go.dev/dl/
+sha256  3ea4c78e6fa52978ae1ed2e5927ad17495da440c9fae7787b1ebc1d0572f7f43  go1.22.5.linux-386.tar.gz
+sha256  904b924d435eaea086515bc63235b192ea441bd8c9b198c507e85009e6e4c7f0  go1.22.5.linux-amd64.tar.gz
+sha256  8d21325bfcf431be3660527c1a39d3d9ad71535fabdf5041c826e44e31642b5a  go1.22.5.linux-arm64.tar.gz
+sha256  8c4587cf3e63c9aefbcafa92818c4d9d51683af93ea687bf6c7508d6fa36f85e  go1.22.5.linux-armv6l.tar.gz
+sha256  5312bb420ac0b59175a58927e70b4660b14ab7319aab54398b6071fabcbfbb09  go1.22.5.linux-ppc64le.tar.gz
+sha256  24c6c5c9d515adea5d58ae78388348c97614a0c21ac4d4f4c0dab75e893b0b5d  go1.22.5.linux-s390x.tar.gz
+sha256  2d36597f7117c38b006835ae7f537487207d8ec407aa9d9980794b2030cbc067  LICENSE
diff --git a/package/go/go-bin/go-bin.mk b/package/go/go-bin/go-bin.mk
new file mode 100644
index 0000000000..155483a2fc
--- /dev/null
+++ b/package/go/go-bin/go-bin.mk
@@ -0,0 +1,20 @@
+################################################################################
+#
+# go-bin
+#
+################################################################################
+
+GO_BIN_SITE = https://go.dev/dl
+HOST_GO_BIN_ACTUAL_SOURCE_TARBALL = go$(GO_VERSION).src.tar.gz
+GO_BIN_LICENSE = BSD-3-Clause
+GO_BIN_LICENSE_FILES = LICENSE
+
+HOST_GO_BIN_PROVIDES = host-go
+
+HOST_GO_BIN_SOURCE = go$(GO_VERSION).linux-$(call qstrip, $(BR2_PACKAGE_HOST_GO_BIN_HOST_ARCH)).tar.gz
+
+define HOST_GO_BIN_INSTALL_CMDS
+	$(GO_BINARIES_INSTALL)
+endef
+
+$(eval $(host-generic-package))
diff --git a/package/go/go.mk b/package/go/go.mk
index 4c56660651..f48d25d415 100644
--- a/package/go/go.mk
+++ b/package/go/go.mk
@@ -71,6 +71,8 @@ HOST_GO_TARGET_ENV = \
 	$(HOST_GO_COMMON_ENV) \
 	GOOS="linux" \
 	GOARCH=$(GO_GOARCH) \
+	$(if $(GO_GO386),GO386=$(GO_GO386)) \
+	$(if $(GO_GOARM),GOARM=$(GO_GOARM)) \
 	CC="$(TARGET_CC)" \
 	CXX="$(TARGET_CXX)" \
 	CGO_CFLAGS="$(TARGET_CFLAGS)" \
-- 
2.46.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 2/2] support/testing: add tests for Go providers
  2024-09-14 15:23 [Buildroot] [PATCH 0/2] Add go-bin virtual package to go providers Thomas Perale via buildroot
  2024-09-14 15:23 ` [Buildroot] [PATCH 1/2] package/go/go-bin: new host-go provider Thomas Perale via buildroot
@ 2024-09-14 15:23 ` Thomas Perale via buildroot
  2024-09-15 14:16   ` Yann E. MORIN
  2024-09-15 14:18 ` [Buildroot] [PATCH 0/2] Add go-bin virtual package to go providers Yann E. MORIN
  2 siblings, 1 reply; 6+ messages in thread
From: Thomas Perale via buildroot @ 2024-09-14 15:23 UTC (permalink / raw)
  To: buildroot
  Cc: Christian Stewart, Yann E . MORIN, Anisse Astier,
	Thomas Petazzoni, Thomas Perale

Test the go-bin provider of host-go to build a Go package.

The tests consist of building and installing a Go package in the root
file system of an ARM vexpress QEMU system.
The tests pass if the program runs on the target.

Signed-off-by: Thomas Perale <thomas.perale@mind.be>
---
 support/testing/tests/package/test_go.py | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/support/testing/tests/package/test_go.py b/support/testing/tests/package/test_go.py
index 0b25fbc26d..305f8aeb3b 100644
--- a/support/testing/tests/package/test_go.py
+++ b/support/testing/tests/package/test_go.py
@@ -13,6 +13,20 @@ class TestGoBase(infra.basetest.BRTest):
         self.emulator.login()
 
 
+class TestGoBin(TestGoBase):
+    config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
+        """
+        BR2_TARGET_ROOTFS_CPIO=y
+        BR2_PACKAGE_HOST_GO=y
+        BR2_PACKAGE_HOST_GO_BIN=y
+        BR2_PACKAGE_TINIFIER=y
+        """
+
+    def test_run(self):
+        self.login()
+        self.assertRunOk("tinifier -h")
+
+
 class TestGoSource(TestGoBase):
     config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
         """
-- 
2.46.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/2] package/go/go-bin: new host-go provider
  2024-09-14 15:23 ` [Buildroot] [PATCH 1/2] package/go/go-bin: new host-go provider Thomas Perale via buildroot
@ 2024-09-15 14:14   ` Yann E. MORIN
  0 siblings, 0 replies; 6+ messages in thread
From: Yann E. MORIN @ 2024-09-15 14:14 UTC (permalink / raw)
  To: Thomas Perale
  Cc: Thomas Petazzoni, Thomas Perale, Anisse Astier, Christian Stewart,
	buildroot

Thomas, All,

On 2024-09-14 17:23 +0200, Thomas Perale via buildroot spake thusly:
> This package provides a pre-built version for the host-go virtual
> package introduced in the previous commits:
> 
>  - host-go-bin installs a pre-built version of the Go compiler.
> 
> By default, host-go remains built from sources to keep the same
> behavior as the former version.
> 
> The menuconfig entry for host-go is updated to expose the host-go-bin
> provider. The dependencies are set as such as if host-go-src does not
> support the host architecture, it will automatically fall back to
> host-go-bin and vice versa.
> 
> Signed-off-by: Thomas Perale <thomas.perale@mind.be>

I've done a few changes:

  - update hashes for 1.22.7
  - add hash for the source tarball
  - set _DL_SUBDIR
  - don't set a prompt to BR2_PACKAGE_HOST_GO_BIN_HOST_ARCH

Applied to master with those fixes, thanks a lot!

Regards,
Yann E. MORIN.

> ---
>  package/go/Config.in.host        | 22 ++++++++++++++++------
>  package/go/go-bin/Config.in.host | 13 +++++++++++++
>  package/go/go-bin/go-bin.hash    |  8 ++++++++
>  package/go/go-bin/go-bin.mk      | 20 ++++++++++++++++++++
>  package/go/go.mk                 |  2 ++
>  5 files changed, 59 insertions(+), 6 deletions(-)
>  create mode 100644 package/go/go-bin/Config.in.host
>  create mode 100644 package/go/go-bin/go-bin.hash
>  create mode 100644 package/go/go-bin/go-bin.mk
> 
> diff --git a/package/go/Config.in.host b/package/go/Config.in.host
> index eefca03b02..435faec555 100644
> --- a/package/go/Config.in.host
> +++ b/package/go/Config.in.host
> @@ -34,7 +34,7 @@ config BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
>  config BR2_PACKAGE_HOST_GO_HOST_ARCH_SUPPORTS
>  	bool
>  	default y
> -	depends on BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE3_ARCH_SUPPORTS
> +	depends on BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE3_ARCH_SUPPORTS || BR2_PACKAGE_HOST_GO_BIN_HOST_ARCH_SUPPORTS
>  
>  # CGO linking for the host. Since we use the same compiler for target
>  # and host, if the target can't do CGO linking, then the host can't.
> @@ -57,7 +57,8 @@ if BR2_PACKAGE_HOST_GO
>  
>  choice
>  	prompt "Go compiler variant"
> -	default BR2_PACKAGE_HOST_GO_SRC
> +	default BR2_PACKAGE_HOST_GO_SRC if BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE3_ARCH_SUPPORTS
> +	default BR2_PACKAGE_HOST_GO_BIN if BR2_PACKAGE_HOST_GO_BIN_HOST_ARCH_SUPPORTS
>  	help
>  	  Select a Go compiler variant.
>  
> @@ -65,18 +66,27 @@ choice
>  
>  config BR2_PACKAGE_HOST_GO_SRC
>  	bool "host go (source)"
> +	depends on BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE3_ARCH_SUPPORTS
>  	help
>  	  This package will build the go compiler for the host.
>  
> -endchoice
> +config BR2_PACKAGE_HOST_GO_BIN
> +	bool "host go (pre-built)"
> +	depends on BR2_PACKAGE_HOST_GO_BIN_HOST_ARCH_SUPPORTS
> +	help
> +	  This package will install pre-built versions of the compiler
>  
> -endif
> +endchoice
>  
>  config BR2_PACKAGE_PROVIDES_HOST_GO
>  	string
> -	# Default to host-go-src, as the only provider for now
> -	default "host-go-src"
> +	# Default to host-go-src
> +	default "host-go-src" if BR2_PACKAGE_HOST_GO_SRC
> +	default "host-go-bin" if BR2_PACKAGE_HOST_GO_BIN
> +
> +endif
>  
> +source "package/go/go-bin/Config.in.host"
>  source "package/go/go-bootstrap-stage1/Config.in.host"
>  source "package/go/go-bootstrap-stage2/Config.in.host"
>  source "package/go/go-bootstrap-stage3/Config.in.host"
> diff --git a/package/go/go-bin/Config.in.host b/package/go/go-bin/Config.in.host
> new file mode 100644
> index 0000000000..51fe3c3fdc
> --- /dev/null
> +++ b/package/go/go-bin/Config.in.host
> @@ -0,0 +1,13 @@
> +config BR2_PACKAGE_HOST_GO_BIN_HOST_ARCH
> +	string "Translate the HOSTARCH into the architecture name used by the Go compiler"
> +	default "armv6l" if BR2_HOSTARCH = "arm"
> +	default "arm64" if BR2_HOSTARCH = "aarch64"
> +	default "ppc64le" if BR2_HOSTARCH = "powerpc64le"
> +	default "s390x" if BR2_HOSTARCH = "s390x"
> +	default "386" if BR2_HOSTARCH = "x86"
> +	default "amd64" if BR2_HOSTARCH = "x86_64"
> +
> +config BR2_PACKAGE_HOST_GO_BIN_HOST_ARCH_SUPPORTS
> +	bool
> +	default y
> +	depends on BR2_PACKAGE_HOST_GO_BIN_HOST_ARCH != ""
> diff --git a/package/go/go-bin/go-bin.hash b/package/go/go-bin/go-bin.hash
> new file mode 100644
> index 0000000000..12fd4c2816
> --- /dev/null
> +++ b/package/go/go-bin/go-bin.hash
> @@ -0,0 +1,8 @@
> +# sha256 checksum from https://go.dev/dl/
> +sha256  3ea4c78e6fa52978ae1ed2e5927ad17495da440c9fae7787b1ebc1d0572f7f43  go1.22.5.linux-386.tar.gz
> +sha256  904b924d435eaea086515bc63235b192ea441bd8c9b198c507e85009e6e4c7f0  go1.22.5.linux-amd64.tar.gz
> +sha256  8d21325bfcf431be3660527c1a39d3d9ad71535fabdf5041c826e44e31642b5a  go1.22.5.linux-arm64.tar.gz
> +sha256  8c4587cf3e63c9aefbcafa92818c4d9d51683af93ea687bf6c7508d6fa36f85e  go1.22.5.linux-armv6l.tar.gz
> +sha256  5312bb420ac0b59175a58927e70b4660b14ab7319aab54398b6071fabcbfbb09  go1.22.5.linux-ppc64le.tar.gz
> +sha256  24c6c5c9d515adea5d58ae78388348c97614a0c21ac4d4f4c0dab75e893b0b5d  go1.22.5.linux-s390x.tar.gz
> +sha256  2d36597f7117c38b006835ae7f537487207d8ec407aa9d9980794b2030cbc067  LICENSE
> diff --git a/package/go/go-bin/go-bin.mk b/package/go/go-bin/go-bin.mk
> new file mode 100644
> index 0000000000..155483a2fc
> --- /dev/null
> +++ b/package/go/go-bin/go-bin.mk
> @@ -0,0 +1,20 @@
> +################################################################################
> +#
> +# go-bin
> +#
> +################################################################################
> +
> +GO_BIN_SITE = https://go.dev/dl
> +HOST_GO_BIN_ACTUAL_SOURCE_TARBALL = go$(GO_VERSION).src.tar.gz
> +GO_BIN_LICENSE = BSD-3-Clause
> +GO_BIN_LICENSE_FILES = LICENSE
> +
> +HOST_GO_BIN_PROVIDES = host-go
> +
> +HOST_GO_BIN_SOURCE = go$(GO_VERSION).linux-$(call qstrip, $(BR2_PACKAGE_HOST_GO_BIN_HOST_ARCH)).tar.gz
> +
> +define HOST_GO_BIN_INSTALL_CMDS
> +	$(GO_BINARIES_INSTALL)
> +endef
> +
> +$(eval $(host-generic-package))
> diff --git a/package/go/go.mk b/package/go/go.mk
> index 4c56660651..f48d25d415 100644
> --- a/package/go/go.mk
> +++ b/package/go/go.mk
> @@ -71,6 +71,8 @@ HOST_GO_TARGET_ENV = \
>  	$(HOST_GO_COMMON_ENV) \
>  	GOOS="linux" \
>  	GOARCH=$(GO_GOARCH) \
> +	$(if $(GO_GO386),GO386=$(GO_GO386)) \
> +	$(if $(GO_GOARM),GOARM=$(GO_GOARM)) \
>  	CC="$(TARGET_CC)" \
>  	CXX="$(TARGET_CXX)" \
>  	CGO_CFLAGS="$(TARGET_CFLAGS)" \
> -- 
> 2.46.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 2/2] support/testing: add tests for Go providers
  2024-09-14 15:23 ` [Buildroot] [PATCH 2/2] support/testing: add tests for Go providers Thomas Perale via buildroot
@ 2024-09-15 14:16   ` Yann E. MORIN
  0 siblings, 0 replies; 6+ messages in thread
From: Yann E. MORIN @ 2024-09-15 14:16 UTC (permalink / raw)
  To: Thomas Perale
  Cc: Thomas Petazzoni, Thomas Perale, Anisse Astier, Christian Stewart,
	buildroot

Thomas, All,

On 2024-09-14 17:23 +0200, Thomas Perale via buildroot spake thusly:
> Test the go-bin provider of host-go to build a Go package.
> 
> The tests consist of building and installing a Go package in the root
> file system of an ARM vexpress QEMU system.
> The tests pass if the program runs on the target.
> 
> Signed-off-by: Thomas Perale <thomas.perale@mind.be>
> ---
>  support/testing/tests/package/test_go.py | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/support/testing/tests/package/test_go.py b/support/testing/tests/package/test_go.py
> index 0b25fbc26d..305f8aeb3b 100644
> --- a/support/testing/tests/package/test_go.py
> +++ b/support/testing/tests/package/test_go.py
> @@ -13,6 +13,20 @@ class TestGoBase(infra.basetest.BRTest):
>          self.emulator.login()
>  
>  
> +class TestGoBin(TestGoBase):
> +    config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
> +        """
> +        BR2_TARGET_ROOTFS_CPIO=y
> +        BR2_PACKAGE_HOST_GO=y
> +        BR2_PACKAGE_HOST_GO_BIN=y
> +        BR2_PACKAGE_TINIFIER=y

tinifier can't be vendored today, so I could not test jhost-go-bin, so I
switched to use another package that could not be vendroed either
(sigh), so I switched to flannel, and that worked.

So, I oushed to master, with the test using flannel imstead of tinifier.
And I also changed the GoSource test similarly.

Applied to master, thanks.

Regards,
Yann E. MORIN.

> +        """
> +
> +    def test_run(self):
> +        self.login()
> +        self.assertRunOk("tinifier -h")
> +
> +
>  class TestGoSource(TestGoBase):
>      config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
>          """
> -- 
> 2.46.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 0/2] Add go-bin virtual package to go providers
  2024-09-14 15:23 [Buildroot] [PATCH 0/2] Add go-bin virtual package to go providers Thomas Perale via buildroot
  2024-09-14 15:23 ` [Buildroot] [PATCH 1/2] package/go/go-bin: new host-go provider Thomas Perale via buildroot
  2024-09-14 15:23 ` [Buildroot] [PATCH 2/2] support/testing: add tests for Go providers Thomas Perale via buildroot
@ 2024-09-15 14:18 ` Yann E. MORIN
  2 siblings, 0 replies; 6+ messages in thread
From: Yann E. MORIN @ 2024-09-15 14:18 UTC (permalink / raw)
  To: Thomas Perale
  Cc: Thomas Petazzoni, Thomas Perale, Anisse Astier, Christian Stewart,
	buildroot

Thomas, All,

On 2024-09-14 17:23 +0200, Thomas Perale via buildroot spake thusly:
> Previous patch set adding 'go-bin' failed the tests in newer go version
> because of illegal instructions.
> 
> This patch set fix the cross-compilation issue coming from the 'go-bin'
> this was solved by specifically mentionning the GOARM version in
> environment variable when building a go package for the target
> (`HOST_GO_TARGET_ENV`).

I applied the series with a few changes, see the commits.

I also added three preparatory commits;
    559bb33ae7 support/testing: do not use s.b.o
    e9b0893a8e package/go/go-src: share download directory with go
    8931e9f534 support/testing: switch go-src to use flannel

Thanks a lot for this work! 👍

Regards,
Yann E. MORIN.

> Thomas Perale (2):
>   package/go/go-bin: new host-go provider
>   support/testing: add tests for Go providers
> 
>  package/go/Config.in.host                | 22 ++++++++++++++++------
>  package/go/go-bin/Config.in.host         | 13 +++++++++++++
>  package/go/go-bin/go-bin.hash            |  8 ++++++++
>  package/go/go-bin/go-bin.mk              | 20 ++++++++++++++++++++
>  package/go/go.mk                         |  2 ++
>  support/testing/tests/package/test_go.py | 14 ++++++++++++++
>  6 files changed, 73 insertions(+), 6 deletions(-)
>  create mode 100644 package/go/go-bin/Config.in.host
>  create mode 100644 package/go/go-bin/go-bin.hash
>  create mode 100644 package/go/go-bin/go-bin.mk
> 
> -- 
> 2.46.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2024-09-15 14:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-14 15:23 [Buildroot] [PATCH 0/2] Add go-bin virtual package to go providers Thomas Perale via buildroot
2024-09-14 15:23 ` [Buildroot] [PATCH 1/2] package/go/go-bin: new host-go provider Thomas Perale via buildroot
2024-09-15 14:14   ` Yann E. MORIN
2024-09-14 15:23 ` [Buildroot] [PATCH 2/2] support/testing: add tests for Go providers Thomas Perale via buildroot
2024-09-15 14:16   ` Yann E. MORIN
2024-09-15 14:18 ` [Buildroot] [PATCH 0/2] Add go-bin virtual package to go providers Yann E. MORIN

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