From 7ec0e1c2b67ecf5554a516a69e70ae47079e8a97 Mon Sep 17 00:00:00 2001 From: Thomas Perale Date: Sat, 14 Sep 2024 17:23:23 +0200 Subject: [PATCH] support/testing: add tests for Go providers 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 [yann.morin.1998@free.fr: use to flannel, which can be vendored today] Signed-off-by: Yann E. MORIN --- 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 a657a435f9..6ca436851b 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_FLANNEL=y + """ + + def test_run(self): + self.login() + self.assertRunOk("/opt/bin/flanneld -h") + + class TestGoSource(TestGoBase): config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ """