From: Heiko Thiery <heiko.thiery@gmail.com>
To: buildroot@buildroot.org
Cc: "Fiona Klute" <fiona.klute@gmx.de>,
"Heiko Thiery" <heiko.thiery@gmail.com>,
"Jan Kundrát" <jan.kundrat@cesnet.cz>,
"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>
Subject: [Buildroot] [PATCH v5 8/9] support/testing/tests/package/test_netopeer2.py: add new test
Date: Tue, 14 Jan 2025 08:29:56 +0100 [thread overview]
Message-ID: <20250114072947.284965-9-heiko.thiery@gmail.com> (raw)
In-Reply-To: <20250114072947.284965-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
next prev parent reply other threads:[~2025-01-14 7:30 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-14 7:29 [Buildroot] [PATCH v5 0/9] netopeer2 package update Heiko Thiery
2025-01-14 7:29 ` [Buildroot] [PATCH v5 1/9] package/libyang: bump to version 3.7.8 Heiko Thiery
2025-01-14 7:29 ` [Buildroot] [PATCH v5 2/9] package/libnetconf2: bump version to 3.5.5 Heiko Thiery
2025-02-03 22:41 ` Thomas Petazzoni via buildroot
2025-02-05 6:49 ` Heiko Thiery
2025-02-05 8:11 ` Thomas Petazzoni via buildroot
2025-01-14 7:29 ` [Buildroot] [PATCH v5 3/9] package/sysrepo: fix shellcheck warnings of init script Heiko Thiery
2025-02-03 22:42 ` Thomas Petazzoni via buildroot
2025-01-14 7:29 ` [Buildroot] [PATCH v5 4/9] package/sysrepo: bump version to 3.3.10 Heiko Thiery
2025-01-14 7:29 ` [Buildroot] [PATCH v5 5/9] package/netopeer2: fix shellcheck warnings Heiko Thiery
2025-02-03 22:42 ` Thomas Petazzoni via buildroot
2025-01-14 7:29 ` [Buildroot] [PATCH v5 6/9] package/netopeer2: bump version to 2.2.35 Heiko Thiery
2025-01-14 7:29 ` [Buildroot] [PATCH v5 7/9] support/testing/tests/package/test_sysrepo.py: add new test Heiko Thiery
2025-01-14 7:29 ` Heiko Thiery [this message]
2025-01-14 7:29 ` [Buildroot] [PATCH v5 9/9] package/netopeer2: build host variant only when doing sysrepo setup Heiko Thiery
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=20250114072947.284965-9-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.