From ed516e25a1322f0081cbb396cf1dc7a8447dd8fb Mon Sep 17 00:00:00 2001 From: Julien Olivain Date: Wed, 10 Jan 2024 22:06:38 +0100 Subject: [PATCH] support/testing: add mtr runtime test Signed-off-by: Julien Olivain Signed-off-by: Yann E. MORIN --- DEVELOPERS | 1 + support/testing/tests/package/test_mtr.py | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 support/testing/tests/package/test_mtr.py diff --git a/DEVELOPERS b/DEVELOPERS index f5b04937b6..0242b749e8 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1790,6 +1790,7 @@ F: support/testing/tests/package/test_lsof.py F: support/testing/tests/package/test_lz4.py F: support/testing/tests/package/test_lzop.py F: support/testing/tests/package/test_mtools.py +F: support/testing/tests/package/test_mtr.py F: support/testing/tests/package/test_ncdu.py F: support/testing/tests/package/test_nftables.py F: support/testing/tests/package/test_nftables/ diff --git a/support/testing/tests/package/test_mtr.py b/support/testing/tests/package/test_mtr.py new file mode 100644 index 0000000000..d78b33a31a --- /dev/null +++ b/support/testing/tests/package/test_mtr.py @@ -0,0 +1,22 @@ +import os + +import infra.basetest + + +class TestMtr(infra.basetest.BRTest): + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + """ + BR2_PACKAGE_MTR=y + BR2_TARGET_ROOTFS_CPIO=y + # BR2_TARGET_ROOTFS_TAR is not set + """ + + def test_run(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() + + self.assertRunOk("mtr --version") + self.assertRunOk("mtr -r -c 5 127.0.0.1", timeout=30)