From: Heiko Thiery <heiko.thiery@gmail.com>
To: buildroot@buildroot.org
Cc: "Jan Kundrát" <jan.kundrat@cesnet.cz>,
"Heiko Thiery" <heiko.thiery@gmail.com>,
"Fiona Klute" <fiona.klute@gmx.de>,
"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>
Subject: [Buildroot] [PATCH v2 6/6] support/testing/tests/package/test_netopeer2.py: add new test
Date: Mon, 30 Dec 2024 11:35:38 +0100 [thread overview]
Message-ID: <20241230103534.671602-7-heiko.thiery@gmail.com> (raw)
In-Reply-To: <20241230103534.671602-1-heiko.thiery@gmail.com>
Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
---
DEVELOPERS | 1 +
.../testing/tests/package/test_netopeer2.py | 40 +++++++++++++++++++
2 files changed, 41 insertions(+)
create mode 100644 support/testing/tests/package/test_netopeer2.py
diff --git a/DEVELOPERS b/DEVELOPERS
index 3534458a96..373e0e1f7f 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1389,6 +1389,7 @@ F: package/rauc/
F: package/sysrepo/
F: support/testing/tests/package/sample_python_yamllint.py
F: support/testing/tests/package/test_python_yamllint.py
+F: support/testing/tests/package/test_netopeer2.py
F: support/testing/tests/package/test_sysrepo.py
N: Hervé Codina <herve.codina@bootlin.com>
diff --git a/support/testing/tests/package/test_netopeer2.py b/support/testing/tests/package/test_netopeer2.py
new file mode 100644
index 0000000000..cbcaba049e
--- /dev/null
+++ b/support/testing/tests/package/test_netopeer2.py
@@ -0,0 +1,40 @@
+import os
+import time
+
+import infra.basetest
+
+
+class TestNetopeer2(infra.basetest.BRTest):
+ config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
+ """
+ BR2_TARGET_ROOTFS_CPIO=y
+ BR2_PACKAGE_NETOPEER2=y
+ BR2_PACKAGE_NETOPEER2_CLI=y
+ """
+
+ def run_netopeer_cli_cmd(self, cmds):
+ cmd = "netopeer2-cli <<EOF\n"
+ cmd += "\n".join(cmds)
+ cmd += "\nEOF"
+ self.assertRunOk(cmd)
+
+ 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()
+
+ # The daemon takes some time to startup
+ time.sleep(2)
+
+ # Check if the Daemon is running
+ self.assertRunOk("ls /var/run/netopeer2-server.pid")
+ self.assertRunOk("ps aux | grep [n]etopeer2-server")
+
+ # Run CLI
+ help_command = [
+ "help",
+ "quit",
+ ]
+ self.run_netopeer_cli_cmd(help_command)
--
2.39.2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
prev parent reply other threads:[~2024-12-30 10:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-30 10:35 [Buildroot] [PATCH v2 0/6] netopeer2 package update Heiko Thiery
2024-12-30 10:35 ` [Buildroot] [PATCH v2 1/6] package/libyang: bump to version 3.4.2 Heiko Thiery
2024-12-30 10:35 ` [Buildroot] [PATCH v2 2/6] package/libnetconf2: bump to version 3.5.1 Heiko Thiery
2024-12-30 10:35 ` [Buildroot] [PATCH v2 3/6] package/sysrepo: bump to version 2.11.7 Heiko Thiery
2024-12-30 10:35 ` [Buildroot] [PATCH v2 4/6] package/netopeer2: bump to version 2.2.31 Heiko Thiery
2024-12-30 11:00 ` Thomas Petazzoni via buildroot
2024-12-30 10:35 ` [Buildroot] [PATCH v2 5/6] support/testing/tests/package/test_sysrepo.py: add new test Heiko Thiery
2024-12-30 10:35 ` Heiko Thiery [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241230103534.671602-7-heiko.thiery@gmail.com \
--to=heiko.thiery@gmail.com \
--cc=buildroot@buildroot.org \
--cc=fiona.klute@gmx.de \
--cc=jan.kundrat@cesnet.cz \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox