[Buildroot] [git commit branch/next] support/tests/cpio: extend runtime tests for extra dract modules
Thomas Petazzoni
thomas.petazzoni at bootlin.com
Mon Feb 6 21:46:35 UTC 2023
commit: https://git.buildroot.net/buildroot/commit/?id=557c68fbd29551f4db6215ab03abfaaa54c6f78f
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/next
Add a basic module that installs a single file, to check that it is
properly accounted for.
Reported-by: Arnout Vandecappelle (Essensium/Mind) <arnout at mind.be>
Signed-off-by: Yann E. MORIN <yann.morin.1998 at free.fr>
Cc: Thierry Bultel <thierry.bultel at linatsea.fr>
Cc: Adam Duskett <aduskett at gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
---
support/testing/tests/fs/test_cpio.py | 5 ++++-
.../tests/fs/test_cpio/modules/99cramfs/module-setup.sh | 11 +++++++++++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/support/testing/tests/fs/test_cpio.py b/support/testing/tests/fs/test_cpio.py
index 8c0d357994..172af579bb 100644
--- a/support/testing/tests/fs/test_cpio.py
+++ b/support/testing/tests/fs/test_cpio.py
@@ -41,9 +41,11 @@ class TestCpioDracutBase(infra.basetest.BRTest):
BR2_PACKAGE_PV=y
BR2_TARGET_ROOTFS_CPIO=y
BR2_TARGET_ROOTFS_CPIO_DRACUT=y
+ BR2_TARGET_ROOTFS_CPIO_DRACUT_MODULES="{}"
BR2_TARGET_ROOTFS_CPIO_DRACUT_CONF_FILES="{}"
# BR2_TARGET_ROOTFS_TAR is not set
- """.format(" ".join(["fs/cpio/dracut.conf",
+ """.format("support/testing/tests/fs/test_cpio/modules",
+ " ".join(["fs/cpio/dracut.conf",
"support/testing/tests/fs/test_cpio/dracut-cramfs.conf"]))
def check_dracut(self):
@@ -57,6 +59,7 @@ class TestCpioDracutBase(infra.basetest.BRTest):
self.assertEqual(out.find("bin/pv"), -1)
# libz should be, because of cramfs
self.assertNotEqual(out.find("usr/bin/mkcramfs"), -1)
+ self.assertNotEqual(out.find("usr/bin/cramfsck"), -1)
self.assertNotEqual(out.find("usr/lib/libz.so"), -1)
exit_code = boot_img(self.emulator,
diff --git a/support/testing/tests/fs/test_cpio/modules/99cramfs/module-setup.sh b/support/testing/tests/fs/test_cpio/modules/99cramfs/module-setup.sh
new file mode 100755
index 0000000000..60706c8bd9
--- /dev/null
+++ b/support/testing/tests/fs/test_cpio/modules/99cramfs/module-setup.sh
@@ -0,0 +1,11 @@
+check() {
+ return 0
+}
+
+depends() {
+ return 0
+}
+
+install() {
+ inst_multiple /usr/bin/cramfsck
+}
More information about the buildroot
mailing list