Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] support/testing: add links runtime test
@ 2024-04-11 21:39 Julien Olivain
  2024-05-09 15:43 ` Thomas Petazzoni via buildroot
  2024-06-03 10:54 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Julien Olivain @ 2024-04-11 21:39 UTC (permalink / raw)
  To: buildroot; +Cc: Julien Olivain

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
 DEVELOPERS                                    |  2 ++
 support/testing/tests/package/test_links.py   | 33 +++++++++++++++++++
 .../test_links/rootfs-overlay/root/file.html  |  9 +++++
 3 files changed, 44 insertions(+)
 create mode 100644 support/testing/tests/package/test_links.py
 create mode 100644 support/testing/tests/package/test_links/rootfs-overlay/root/file.html

diff --git a/DEVELOPERS b/DEVELOPERS
index 399b2931ff3..9001632cfa3 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1815,6 +1815,8 @@ F:	support/testing/tests/package/test_libcamera.py
 F:	support/testing/tests/package/test_libcamera/
 F:	support/testing/tests/package/test_libgpgme.py
 F:	support/testing/tests/package/test_libjxl.py
+F:	support/testing/tests/package/test_links.py
+F:	support/testing/tests/package/test_links/
 F:	support/testing/tests/package/test_lrzip.py
 F:	support/testing/tests/package/test_ltrace.py
 F:	support/testing/tests/package/test_lvm2.py
diff --git a/support/testing/tests/package/test_links.py b/support/testing/tests/package/test_links.py
new file mode 100644
index 00000000000..ed52bb2d5fc
--- /dev/null
+++ b/support/testing/tests/package/test_links.py
@@ -0,0 +1,33 @@
+import os
+
+import infra.basetest
+
+
+class TestLinks(infra.basetest.BRTest):
+    rootfs_overlay = \
+        infra.filepath("tests/package/test_links/rootfs-overlay")
+    config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
+        f"""
+        BR2_PACKAGE_LINKS=y
+        BR2_ROOTFS_OVERLAY="{rootfs_overlay}"
+        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("links -version")
+
+        expected_str = "Hello Buildroot !"
+        html_file = "/root/file.html"
+        url = f"file://{html_file}"
+
+        cmd = f"links -dump {url}"
+        out, ret = self.emulator.run(cmd)
+        self.assertEqual(ret, 0)
+        self.assertEqual(out[0].strip(), expected_str)
diff --git a/support/testing/tests/package/test_links/rootfs-overlay/root/file.html b/support/testing/tests/package/test_links/rootfs-overlay/root/file.html
new file mode 100644
index 00000000000..65b33cb5a7d
--- /dev/null
+++ b/support/testing/tests/package/test_links/rootfs-overlay/root/file.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <title>Buildroot Test Page</title>
+  </head>
+  <body>
+    <p><b>Hello</b> <i>Buildroot</i> &excl;</p>
+  </body>
+</html>
-- 
2.44.0

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/1] support/testing: add links runtime test
  2024-04-11 21:39 [Buildroot] [PATCH 1/1] support/testing: add links runtime test Julien Olivain
@ 2024-05-09 15:43 ` Thomas Petazzoni via buildroot
  2024-06-03 10:54 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-05-09 15:43 UTC (permalink / raw)
  To: Julien Olivain; +Cc: buildroot

On Thu, 11 Apr 2024 23:39:40 +0200
Julien Olivain <ju.o@free.fr> wrote:

> Signed-off-by: Julien Olivain <ju.o@free.fr>
> ---
>  DEVELOPERS                                    |  2 ++
>  support/testing/tests/package/test_links.py   | 33 +++++++++++++++++++
>  .../test_links/rootfs-overlay/root/file.html  |  9 +++++
>  3 files changed, 44 insertions(+)
>  create mode 100644 support/testing/tests/package/test_links.py
>  create mode 100644 support/testing/tests/package/test_links/rootfs-overlay/root/file.html

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/1] support/testing: add links runtime test
  2024-04-11 21:39 [Buildroot] [PATCH 1/1] support/testing: add links runtime test Julien Olivain
  2024-05-09 15:43 ` Thomas Petazzoni via buildroot
@ 2024-06-03 10:54 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2024-06-03 10:54 UTC (permalink / raw)
  To: Julien Olivain; +Cc: buildroot

>>>>> "Julien" == Julien Olivain <ju.o@free.fr> writes:

 > Signed-off-by: Julien Olivain <ju.o@free.fr>

Committed to 2024.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-06-03 10:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-11 21:39 [Buildroot] [PATCH 1/1] support/testing: add links runtime test Julien Olivain
2024-05-09 15:43 ` Thomas Petazzoni via buildroot
2024-06-03 10:54 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox