summaryrefslogtreecommitdiff
path: root/sys-process/xjobs/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-09-16 09:32:48 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-09-16 09:32:48 +0100
commit9ee6d97c2883d42f204a533a8bc1f4562df778fb (patch)
treeb690ddc0ca30f1472887edbb0b8313629bfcbbb2 /sys-process/xjobs/files
parentb17a3ef12038de50228bade1f05502c74e135321 (diff)
gentoo resync : 16.09.2020
Diffstat (limited to 'sys-process/xjobs/files')
-rw-r--r--sys-process/xjobs/files/xjobs-20200726-command-v.patch48
-rw-r--r--sys-process/xjobs/files/xjobs-20200726-dont-page-tests.patch27
2 files changed, 75 insertions, 0 deletions
diff --git a/sys-process/xjobs/files/xjobs-20200726-command-v.patch b/sys-process/xjobs/files/xjobs-20200726-command-v.patch
new file mode 100644
index 000000000000..8e233ba816c2
--- /dev/null
+++ b/sys-process/xjobs/files/xjobs-20200726-command-v.patch
@@ -0,0 +1,48 @@
+From c25bbd08331d88dc1f68806e204a091ed5693f9a Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 15 Sep 2020 20:03:06 -0400
+Subject: [PATCH 1/2] runtest1.sh,testdummy: use "command -v" instead of
+ "which".
+
+The "command -v" incantation is the POSIX-compatible version of the
+"which" command, described in
+
+ https://pubs.opengroup.org/onlinepubs/9699919799/utilities/command.html
+
+This commit changes two uses of "which" to "command -v" for maximum
+compatibility. This has a nice side effect; it eliminates the error
+output when the first of two alternatives is not found, as in
+
+ which: no gsleep in (...)
+
+before the "sleep" command is used as a fallback.
+---
+ runtest1.sh | 2 +-
+ testdummy | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/runtest1.sh b/runtest1.sh
+index 7584116..2dfadd1 100755
+--- a/runtest1.sh
++++ b/runtest1.sh
+@@ -1,4 +1,4 @@
+ #!/bin/sh
+
+-A=`which gawk || which awk`
++A="$(command -v gawk || command -v awk)"
+ $A "BEGIN{for (i=0;i<10;++i) print rand()*10}" | ./xjobs -j8 ./testdummy
+diff --git a/testdummy b/testdummy
+index 1787a46..f511806 100755
+--- a/testdummy
++++ b/testdummy
+@@ -1,6 +1,6 @@
+ #!/bin/sh
+
+-S=`which gsleep||which sleep`
++S="$(command -v gsleep || command -v sleep)"
+ $S $1
+ expr "$1" \> "4" > /dev/null
+ if [ "$?" != "0" ]; then
+--
+2.26.2
+
diff --git a/sys-process/xjobs/files/xjobs-20200726-dont-page-tests.patch b/sys-process/xjobs/files/xjobs-20200726-dont-page-tests.patch
new file mode 100644
index 000000000000..078a0a2af5aa
--- /dev/null
+++ b/sys-process/xjobs/files/xjobs-20200726-dont-page-tests.patch
@@ -0,0 +1,27 @@
+From d8b0e6f20d3e4bfc1989e98856ab11a16851b32e Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 15 Sep 2020 20:13:44 -0400
+Subject: [PATCH 2/2] runtest1.sh: unset PAGER while running tests.
+
+There's no need to page this output, and it makes automating the test
+suite a pain in the butt. Unsetting PAGER in the test script makes
+it work normally again.
+
+Gentoo-bug: https://bugs.gentoo.org/742443
+---
+ runtest1.sh | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/runtest1.sh b/runtest1.sh
+index 2dfadd1..8d5c46d 100755
+--- a/runtest1.sh
++++ b/runtest1.sh
+@@ -1,4 +1,5 @@
+ #!/bin/sh
+
+ A="$(command -v gawk || command -v awk)"
++unset PAGER
+ $A "BEGIN{for (i=0;i<10;++i) print rand()*10}" | ./xjobs -j8 ./testdummy
+--
+2.26.2
+