pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bats-core: Add patches to make tests pass
Module Name: pkgsrc-wip
Committed By: Iku Iwasa <iku.iwasa%gmail.com@localhost>
Pushed By: iquiw
Date: Sun Feb 27 10:30:57 2022 +0900
Changeset: fce17f756f17f085042f2ced7b0116a3d3038146
Modified Files:
bats-core/Makefile
bats-core/distinfo
Added Files:
bats-core/patches/patch-libexec_bats-core_bats
bats-core/patches/patch-test_install.bats
Log Message:
bats-core: Add patches to make tests pass
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=fce17f756f17f085042f2ced7b0116a3d3038146
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
bats-core/Makefile | 2 +-
bats-core/distinfo | 2 ++
bats-core/patches/patch-libexec_bats-core_bats | 15 ++++++++
bats-core/patches/patch-test_install.bats | 50 ++++++++++++++++++++++++++
4 files changed, 68 insertions(+), 1 deletion(-)
diffs:
diff --git a/bats-core/Makefile b/bats-core/Makefile
index 09f9c90da6..69511aab00 100644
--- a/bats-core/Makefile
+++ b/bats-core/Makefile
@@ -23,6 +23,6 @@ do-install:
cd ${WRKSRC} && ${SETENV} PKGMANDIR=${PKGMANDIR} ./install.sh ${DESTDIR}${PREFIX}
do-test:
- cd ${WRKSRC} && ./bin/bats ./test
+ cd ${WRKSRC} && ${SETENV} LC_MESSAGES=C PKGMANDIR=${PKGMANDIR} ./bin/bats ./test
.include "../../mk/bsd.pkg.mk"
diff --git a/bats-core/distinfo b/bats-core/distinfo
index da1d1c35cb..b54cdd165a 100644
--- a/bats-core/distinfo
+++ b/bats-core/distinfo
@@ -4,3 +4,5 @@ BLAKE2s (bats-core-1.6.0.tar.gz) = add1bde3f78b8b2728eb44f08cd70b67d98e3748722d4
SHA512 (bats-core-1.6.0.tar.gz) = b5477d83339294651341734fa2eea54e73ca35e198260eab80cf3313b20904550e57b3471471fd3abfe0c4e02e360c713a87b3ee5e14468d89f3257445e6bb35
Size (bats-core-1.6.0.tar.gz) = 116367 bytes
SHA1 (patch-install.sh) = 482b34ba79587a54220567bc4e104c7071aab1de
+SHA1 (patch-libexec_bats-core_bats) = ba322d4d3085030a07f6683e692ab26573d8a98d
+SHA1 (patch-test_install.bats) = c93f9f3b166ab17fc7bdec1dfddabb1527173e21
diff --git a/bats-core/patches/patch-libexec_bats-core_bats b/bats-core/patches/patch-libexec_bats-core_bats
new file mode 100644
index 0000000000..d0c8756c1d
--- /dev/null
+++ b/bats-core/patches/patch-libexec_bats-core_bats
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Use NetBSD sort compatible option instead of GNU sort's.
+
+--- libexec/bats-core/bats.orig 2022-02-27 01:01:49.445156305 +0000
++++ libexec/bats-core/bats
+@@ -345,7 +345,7 @@ for filename in "${arguments[@]}"; do
+ if [[ "$recursive" -eq 1 ]]; then
+ while IFS= read -r -d $'\0' file; do
+ filenames+=("$file")
+- done < <(find -L "$filename" -type f -name "*.${BATS_FILE_EXTENSION:-bats}" -print0 | sort -z)
++ done < <(find -L "$filename" -type f -name "*.${BATS_FILE_EXTENSION:-bats}" -print0 | sort -R 0x00)
+ else
+ for suite_filename in "$filename"/*."${BATS_FILE_EXTENSION:-bats}"; do
+ filenames+=("$suite_filename")
diff --git a/bats-core/patches/patch-test_install.bats b/bats-core/patches/patch-test_install.bats
new file mode 100644
index 0000000000..8ead75da24
--- /dev/null
+++ b/bats-core/patches/patch-test_install.bats
@@ -0,0 +1,50 @@
+$NetBSD$
+
+Use $PKGMANDIR to check installation of man files.
+
+--- test/install.bats.orig 2022-02-24 14:27:24.000000000 +0000
++++ test/install.bats
+@@ -29,8 +29,8 @@ setup() {
+ [ -x "$INSTALL_DIR/libexec/bats-core/bats-format-junit" ]
+ [ -x "$INSTALL_DIR/libexec/bats-core/bats-format-pretty" ]
+ [ -x "$INSTALL_DIR/libexec/bats-core/bats-preprocess" ]
+- [ -f "$INSTALL_DIR/share/man/man1/bats.1" ]
+- [ -f "$INSTALL_DIR/share/man/man7/bats.7" ]
++ [ -f "$INSTALL_DIR/$PKGMANDIR/man1/bats.1" ]
++ [ -f "$INSTALL_DIR/$PKGMANDIR/man7/bats.7" ]
+
+ run "$INSTALL_DIR/bin/bats" -v
+ [ "$status" -eq 0 ]
+@@ -52,8 +52,8 @@ setup() {
+ [ ! -x "$INSTALL_DIR/libexec/bats-core/bats-format-pretty" ]
+ [ ! -x "$INSTALL_DIR/libexec/bats-core/bats-preprocess" ]
+ [ ! -x "$INSTALL_DIR/libexec/bats-core" ]
+- [ ! -x "$INSTALL_DIR/share/man/man1/bats.1" ]
+- [ ! -x "$INSTALL_DIR/share/man/man7/bats.7" ]
++ [ ! -x "$INSTALL_DIR/$PKGMANDIR/man1/bats.1" ]
++ [ ! -x "$INSTALL_DIR/$PKGMANDIR/man7/bats.7" ]
+ }
+
+ @test "install.sh creates a multilib valid installation, and uninstall.sh undos it" {
+@@ -75,8 +75,8 @@ setup() {
+ [ -x "$INSTALL_DIR/libexec/bats-core/bats-format-junit" ]
+ [ -x "$INSTALL_DIR/libexec/bats-core/bats-format-pretty" ]
+ [ -x "$INSTALL_DIR/libexec/bats-core/bats-preprocess" ]
+- [ -f "$INSTALL_DIR/share/man/man1/bats.1" ]
+- [ -f "$INSTALL_DIR/share/man/man7/bats.7" ]
++ [ -f "$INSTALL_DIR/$PKGMANDIR/man1/bats.1" ]
++ [ -f "$INSTALL_DIR/$PKGMANDIR/man7/bats.7" ]
+
+ run "$INSTALL_DIR/bin/bats" -v
+ [ "$status" -eq 0 ]
+@@ -98,8 +98,8 @@ setup() {
+ [ ! -x "$INSTALL_DIR/libexec/bats-core/bats-format-pretty" ]
+ [ ! -x "$INSTALL_DIR/libexec/bats-core/bats-preprocess" ]
+ [ ! -x "$INSTALL_DIR/libexec/bats-core" ]
+- [ ! -x "$INSTALL_DIR/share/man/man1/bats.1" ]
+- [ ! -x "$INSTALL_DIR/share/man/man7/bats.7" ]
++ [ ! -x "$INSTALL_DIR/$PKGMANDIR/man1/bats.1" ]
++ [ ! -x "$INSTALL_DIR/$PKGMANDIR/man7/bats.7" ]
+ }
+
+ @test "uninstall.sh works even if nothing is installed" {
Home |
Main Index |
Thread Index |
Old Index