1477b60d4e
Since the commit replacing moonjit by luajit [1] luvi doesn't work without
rng support enabled.
Switch to armv5 to use virtio-rng-pci on the qemu command line [2].
[1] 9450b53c8e
[2] https://git.buildroot.net/buildroot/tree/support/testing/infra/emulator.py?h=2021.08.1
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Jörg Krause <joerg.krause@embedded.rocks>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
37 lines
1021 B
Python
37 lines
1021 B
Python
import os
|
|
|
|
import infra.basetest
|
|
|
|
|
|
class TestLuvi(infra.basetest.BRTest):
|
|
config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
|
|
"""
|
|
BR2_TARGET_ROOTFS_CPIO=y
|
|
# BR2_TARGET_ROOTFS_TAR is not set
|
|
BR2_PACKAGE_LUAJIT=y
|
|
BR2_PACKAGE_LUVI=y
|
|
BR2_PACKAGE_OPENSSL=y
|
|
BR2_PACKAGE_PCRE=y
|
|
BR2_PACKAGE_ZLIB=y
|
|
"""
|
|
|
|
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()
|
|
|
|
def version_test(self):
|
|
cmd = "luvi -v"
|
|
output, exit_code = self.emulator.run(cmd)
|
|
self.assertIn('luvi', output[0])
|
|
self.assertIn('zlib', output[1])
|
|
self.assertIn('rex', output[2])
|
|
self.assertIn('libuv', output[3])
|
|
self.assertIn('ssl', output[4])
|
|
|
|
def test_run(self):
|
|
self.login()
|
|
self.version_test()
|