1import os
2
3import infra.basetest
4
5
6class TestLibshdata(infra.basetest.BRTest):
7    config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
8        """
9        BR2_PACKAGE_LIBSHDATA=y
10        BR2_PACKAGE_LIBSHDATA_STRESS=y
11        BR2_TARGET_ROOTFS_CPIO=y
12        # BR2_TARGET_ROOTFS_TAR is not set
13        """
14
15    def test_run(self):
16        img = os.path.join(self.builddir, "images", "rootfs.cpio")
17        self.emulator.boot(arch="armv5",
18                           kernel="builtin",
19                           options=["-initrd", img])
20        self.emulator.login()
21
22        # Just run libshdata-stress.
23        # This ensures that library are well compiled and that all dependencies
24        # are met using Parrot Alchemy build system.
25        self.assertRunOk("libshdata-stress")
26