new file mode 100644
@@ -0,0 +1,40 @@
+import os
+
+import infra.basetest
+
+
+class TestGoBase(infra.basetest.BRTest):
+
+ def login(self):
+ cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio")
+ self.emulator.boot(arch="armv5",
+ kernel="builtin",
+ options=["-initrd", cpio_file])
+ self.emulator.login()
+
+
+class TestGoBin(TestGoBase):
+ config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
+ """
+ BR2_TARGET_ROOTFS_CPIO=y
+ BR2_PACKAGE_HOST_GOC=y
+ BR2_PACKAGE_TINIFIER=y
+ """
+
+ def test_run(self):
+ self.login()
+ self.assertRunOk("tinifier -h")
+
+
+class TestGo(TestGoBase):
+ config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
+ """
+ BR2_TARGET_ROOTFS_CPIO=y
+ BR2_PACKAGE_HOST_GOC=y
+ BR2_PACKAGE_HOST_GO=y
+ BR2_PACKAGE_TINIFIER=y
+ """
+
+ def test_run(self):
+ self.login()
+ self.assertRunOk("tinifier -h")
Test the support of both the pre-built Go compiler and the Go compiler built from source. The test consists of compiling and installing in the root file system of a ARM vexpress QEMU system. The tests pass if the program can be ran correctly on the target. Signed-off-by: Thomas Perale <thomas.perale@mind.be> --- support/testing/tests/package/test_go.py | 40 ++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 support/testing/tests/package/test_go.py