Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/dos2unix: bump to version 7.5.0
@ 2023-06-11 20:39 Julien Olivain
  2023-06-26 20:05 ` [Buildroot] [PATCH 2/2] support/testing/tests/package/test_dos2unix.py: new runtime test Julien Olivain
  0 siblings, 1 reply; 3+ messages in thread
From: Julien Olivain @ 2023-06-11 20:39 UTC (permalink / raw)
  To: buildroot; +Cc: David Bachelart, Julien Olivain

For change log, see:
https://waterlan.home.xs4all.nl/dos2unix/ChangeLog.txt

The license hash changed due to URL and year update,
since version 7.4.3:

-See also http://www.freebsd.org/copyright/freebsd-license.html
+See also https://www.freebsd.org/copyright/freebsd-license.html

-Copyright (C) 2009-2022  Erwin Waterlander
+Copyright (C) 2009-2023  Erwin Waterlander

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
 package/dos2unix/dos2unix.hash | 6 +++---
 package/dos2unix/dos2unix.mk   | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/package/dos2unix/dos2unix.hash b/package/dos2unix/dos2unix.hash
index a16c1aecac..032c8ea2d2 100644
--- a/package/dos2unix/dos2unix.hash
+++ b/package/dos2unix/dos2unix.hash
@@ -1,4 +1,4 @@
 # Locally calculated after checking pgp signature
-# https://waterlan.home.xs4all.nl/dos2unix/dos2unix-7.4.3.tar.gz.asc
-sha256  b68db41956daf933828423aa30510e00c12d29ef5916e715e8d4e694fe66ca72  dos2unix-7.4.3.tar.gz
-sha256  275ce1371734904b275e83bf760e3e6d2a520614545a3850c9568d1892b940fd  COPYING.txt
+# https://waterlan.home.xs4all.nl/dos2unix/dos2unix-7.5.0.tar.gz.asc
+sha256  7a3b01d01e214d62c2b3e04c3a92e0ddc728a385566e4c0356efa66fd6eb95af  dos2unix-7.5.0.tar.gz
+sha256  6009a35c7aaee9888fd4844972c37b84bce22e7407893727c70f4f3560ae3eac  COPYING.txt
diff --git a/package/dos2unix/dos2unix.mk b/package/dos2unix/dos2unix.mk
index f16a527f2e..6d1e70cf26 100644
--- a/package/dos2unix/dos2unix.mk
+++ b/package/dos2unix/dos2unix.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-DOS2UNIX_VERSION = 7.4.3
+DOS2UNIX_VERSION = 7.5.0
 DOS2UNIX_SITE = http://waterlan.home.xs4all.nl/dos2unix
 DOS2UNIX_LICENSE = BSD-2-Clause
 DOS2UNIX_LICENSE_FILES = COPYING.txt
-- 
2.41.0

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

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

* [Buildroot] [PATCH 2/2] support/testing/tests/package/test_dos2unix.py: new runtime test
  2023-06-11 20:39 [Buildroot] [PATCH 1/2] package/dos2unix: bump to version 7.5.0 Julien Olivain
@ 2023-06-26 20:05 ` Julien Olivain
  2023-07-10 17:48   ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 3+ messages in thread
From: Julien Olivain @ 2023-06-26 20:05 UTC (permalink / raw)
  To: buildroot; +Cc: Julien Olivain

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
 DEVELOPERS                                    |  1 +
 .../testing/tests/package/test_dos2unix.py    | 45 +++++++++++++++++++
 2 files changed, 46 insertions(+)
 create mode 100644 support/testing/tests/package/test_dos2unix.py

diff --git a/DEVELOPERS b/DEVELOPERS
index 7aa5980df7..da9027f6f4 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1737,6 +1737,7 @@ F:	support/testing/tests/package/sample_python_pyalsa.py
 F:	support/testing/tests/package/sample_python_spake2.py
 F:	support/testing/tests/package/test_ddrescue.py
 F:	support/testing/tests/package/test_ddrescue/
+F:	support/testing/tests/package/test_dos2unix.py
 F:	support/testing/tests/package/test_gnupg2.py
 F:	support/testing/tests/package/test_highway.py
 F:	support/testing/tests/package/test_hwloc.py
diff --git a/support/testing/tests/package/test_dos2unix.py b/support/testing/tests/package/test_dos2unix.py
new file mode 100644
index 0000000000..af5850ae3e
--- /dev/null
+++ b/support/testing/tests/package/test_dos2unix.py
@@ -0,0 +1,45 @@
+import os
+
+import infra.basetest
+
+
+class TestDos2Unix(infra.basetest.BRTest):
+    config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
+        """
+        BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
+        BR2_PACKAGE_DOS2UNIX=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()
+
+        # Check the program can run. This test also checks that we're
+        # using the real "dos2unix" rather than the applet provided in
+        # BusyBox, since the "--version" option is recognized by the
+        # real dos2unix and return an error in BusyBox.
+        self.assertRunOk("dos2unix --version")
+
+        # Create a text file with UNIX new-lines
+        self.assertRunOk("echo -e 'Hello\\nBuildroot' > original.txt")
+
+        # Convert the original UNIX file to DOS
+        self.assertRunOk("unix2dos -n original.txt dos.txt")
+
+        # DOS file is expected to be different than the UNIX file
+        _, exit_code = self.emulator.run("cmp original.txt dos.txt")
+        self.assertNotEqual(exit_code, 0)
+
+        # The "cat -A" command should print '^M$' for CR-LF
+        self.assertRunOk("cat -A dos.txt | grep -Fq '^M$'")
+
+        # Convert back DOS file to UNIX
+        self.assertRunOk("dos2unix -n dos.txt unix.txt")
+
+        # "unix.txt" should be identical to "original.txt"
+        self.assertRunOk("cmp original.txt unix.txt")
-- 
2.41.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 2/2] support/testing/tests/package/test_dos2unix.py: new runtime test
  2023-06-26 20:05 ` [Buildroot] [PATCH 2/2] support/testing/tests/package/test_dos2unix.py: new runtime test Julien Olivain
@ 2023-07-10 17:48   ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-07-10 17:48 UTC (permalink / raw)
  To: Julien Olivain; +Cc: buildroot

On Mon, 26 Jun 2023 22:05:50 +0200
Julien Olivain <ju.o@free.fr> wrote:

> Signed-off-by: Julien Olivain <ju.o@free.fr>
> ---
>  DEVELOPERS                                    |  1 +
>  .../testing/tests/package/test_dos2unix.py    | 45 +++++++++++++++++++
>  2 files changed, 46 insertions(+)
>  create mode 100644 support/testing/tests/package/test_dos2unix.py

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

end of thread, other threads:[~2023-07-10 17:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-11 20:39 [Buildroot] [PATCH 1/2] package/dos2unix: bump to version 7.5.0 Julien Olivain
2023-06-26 20:05 ` [Buildroot] [PATCH 2/2] support/testing/tests/package/test_dos2unix.py: new runtime test Julien Olivain
2023-07-10 17:48   ` Thomas Petazzoni via buildroot

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