Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
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 5/6] support/testing/tests/package/test_sysrepo.py: add new test
Date: Mon, 30 Dec 2024 11:35:37 +0100	[thread overview]
Message-ID: <20241230103534.671602-6-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 +
 support/testing/tests/package/test_sysrepo.py | 25 +++++++++++++++++++
 2 files changed, 26 insertions(+)
 create mode 100644 support/testing/tests/package/test_sysrepo.py

diff --git a/DEVELOPERS b/DEVELOPERS
index aedd736772..3534458a96 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_sysrepo.py
 
 N:	Hervé Codina <herve.codina@bootlin.com>
 F:	package/alchemy/
diff --git a/support/testing/tests/package/test_sysrepo.py b/support/testing/tests/package/test_sysrepo.py
new file mode 100644
index 0000000000..bf0c2a1305
--- /dev/null
+++ b/support/testing/tests/package/test_sysrepo.py
@@ -0,0 +1,25 @@
+import os
+
+import infra.basetest
+
+
+class TestSysrepo(infra.basetest.BRTest):
+    config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
+        """
+        BR2_TARGET_ROOTFS_CPIO=y
+        BR2_PACKAGE_SYSREPO=y
+        """
+
+    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("sysrepoctl -h")
+        self.assertRunOk("sysrepoctl -l")
+
+        self.assertRunOk("sysrepocfg -h")
+        self.assertRunOk('sysrepocfg -X -d operational -x "/sysrepo-monitoring:sysrepo-state"')
+        self.assertRunOk('sysrepocfg -X -d operational -x "/sysrepo-monitoring:sysrepo-state" -f json')
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  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 ` Heiko Thiery [this message]
2024-12-30 10:35 ` [Buildroot] [PATCH v2 6/6] support/testing/tests/package/test_netopeer2.py: add new test 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=20241230103534.671602-6-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