commit: 93279f2848d01437bf203c11ec0a7a14d43e3ad1
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 8 09:38:05 2019 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Apr 8 09:38:05 2019 +0000
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=93279f28
travis: try line splitting for xargs
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
tests/qdepends/dotest | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/tests/qdepends/dotest b/tests/qdepends/dotest
index 8971d6e..516d793 100755
--- a/tests/qdepends/dotest
+++ b/tests/qdepends/dotest
@@ -24,16 +24,12 @@ test() {
# qdepends output is based on a hash, which may differ based on
# endiannes, so sort the output so we get a deterministic set
while IFS= read -r line ; do
- echo "I read: ${line} with ${SHELL}/${BASH}"
case "${line}" in
- *":"*)
- echo "I found a :"
- # dinosaur style for Travis' /bin/bash (or /bin/sh?)
- pkg="$(echo "${line}" | cut -d':' -f1)"
- line="$(echo "${line}" | cut -d':' -f2-)"
- echo "I think pkg=${pkg}, line=${line}"
+ *:*)
+ pkg=${line%%:*}
+ line=${line#*:}
env LC_ALL=C \
- echo "${pkg}: $(echo "${line}" | xargs -n1 |
sort | xargs)"
+ echo "${pkg}: $(echo "${line}" | tr ' ' '\n' |
sort | xargs)"
;;
*)
echo "${line}"
@@ -51,7 +47,6 @@ test() {
testf() { test "$1" "${3:-0}" -f "$2"; }
-if false ; then
# basic sanity checks
testf 00 '|' 1
testf 01 ''
@@ -64,7 +59,6 @@ testf 05 '|| ( || ( || ( x ) a ) )'
# hande use deps on atoms #470180
testf 06 'a[foo(+)]'
-fi
testQ() { test "$1" "${3:-0}" -Q "$2"; }