mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-10-21 00:01:55 -09:00
Based on the first pipeline result [1], use larger runner for the following tests: tests.fs.test_oci.TestOci.test_run (01:08:15) saas-linux-small-amd64 -> saas-linux-xlarge-amd64 tests.package.test_dpdk.TestDPDK.test_run (01:08:36) saas-linux-small-amd64 -> saas-linux-xlarge-amd64 tests.package.test_z3.TestZ3.test_run (01:11:41) saas-linux-small-amd64 -> saas-linux-xlarge-amd64 tests.package.test_octave.TestOctave.test_run (01:21:57) saas-linux-small-amd64 -> saas-linux-xlarge-amd64 tests.package.test_podman.TestPodmanSlirpNftables.test_run (01:21:15) saas-linux-small-amd64 -> saas-linux-xlarge-amd64 tests.package.test_podman.TestPodmanSlirpIptables.test_run (01:21:25) saas-linux-small-amd64 -> saas-linux-xlarge-amd64 tests.package.test_mariadb.TestMariaDB.test_run (01:26:15) saas-linux-small-amd64 -> saas-linux-xlarge-amd64 tests.package.test_podman.TestPodmanIptables.test_run (01:28:51) saas-linux-small-amd64 -> saas-linux-xlarge-amd64 tests.package.test_podman.TestPodmanTini.test_run (01:29:08) saas-linux-small-amd64 -> saas-linux-xlarge-amd64 tests.package.test_podman.TestPodmanNftables.test_run (01:41:26) saas-linux-small-amd64 -> saas-linux-xlarge-amd64 tests.package.test_weston.TestWeston.test_run (01:26:17) saas-linux-large-amd64 -> saas-linux-2xlarge-amd64 tests.package.test_python_pyqt5.TestPythonPyQt5.test_run (01:41:33) saas-linux-large-amd64 -> saas-linux-2xlarge-amd64 tests.package.test_nodejs.TestNodeJSModuleHostBin.test_run (01:21:06) saas-linux-large-amd64 -> saas-linux-2xlarge-amd64 tests.package.test_flutter.TestFlutter.test_run (01:03:05) saas-linux-xlarge-amd64 -> saas-linux-2xlarge-amd64 For tests long that already use 2xlarge runner tag, we may have to run them on Gitlab runners owned by the Buildroot project. [1] https://gitlab.com/buildroot.org/buildroot/-/pipelines/2562421098 Signed-off-by: Romain Naour <romain.naour@smile.fr> Signed-off-by: Arnout Vandecappelle <arnout@rnout.be>
59 lines
2.0 KiB
Python
59 lines
2.0 KiB
Python
import os
|
|
import shutil
|
|
import infra.basetest
|
|
|
|
|
|
# gitlab-runner: xlarge
|
|
class TestOci(infra.basetest.BRTest):
|
|
config = \
|
|
"""
|
|
BR2_aarch64=y
|
|
BR2_TOOLCHAIN_EXTERNAL=y
|
|
BR2_LINUX_KERNEL=y
|
|
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
|
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.18.21"
|
|
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
|
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt/linux.config"
|
|
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
|
|
BR2_PACKAGE_CGROUPFS_MOUNT=y
|
|
BR2_PACKAGE_CONTAINERD=y
|
|
BR2_TARGET_ROOTFS_EXT2=y
|
|
BR2_TARGET_ROOTFS_EXT2_SIZE="600M"
|
|
BR2_TARGET_ROOTFS_OCI=y
|
|
BR2_TARGET_ROOTFS_OCI_ENTRYPOINT="df"
|
|
BR2_TARGET_ROOTFS_OCI_CMD="-h"
|
|
BR2_TARGET_ROOTFS_OCI_ARCHIVE=y
|
|
# BR2_TARGET_ROOTFS_TAR is not set
|
|
"""
|
|
|
|
def login(self):
|
|
rootfs = os.path.join(self.builddir, "images", "rootfs.ext2")
|
|
kern = os.path.join(self.builddir, "images", "Image")
|
|
self.emulator.boot(arch="aarch64",
|
|
kernel=kern,
|
|
kernel_cmdline=["root=/dev/vda", "console=ttyAMA0"],
|
|
options=["-M", "virt",
|
|
"-cpu", "cortex-a57",
|
|
"-m", "512M",
|
|
"-drive", "file={},format=raw,if=virtio".format(rootfs)])
|
|
self.emulator.login()
|
|
|
|
def place_test_oci(self):
|
|
shutil.copy(os.path.join(self.builddir, 'images', 'rootfs-oci-latest-arm64-linux.oci-image.tar'),
|
|
os.path.join(self.builddir, 'target', 'oci.tar'))
|
|
# rebuild to make sure oci.tar ends up in rootfs.ext2
|
|
self.b.build()
|
|
|
|
def test_run(self):
|
|
self.place_test_oci()
|
|
self.login()
|
|
|
|
cmd = "containerd &"
|
|
self.assertRunOk(cmd)
|
|
|
|
cmd = "ctr image import --base-name buildroot-test /oci.tar"
|
|
self.assertRunOk(cmd, timeout=120)
|
|
|
|
cmd = "ctr run --rm --tty buildroot-test:latest v1"
|
|
self.assertRunOk(cmd, timeout=120)
|