aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2021-12-23 12:49:16 +0100
committerFabian Groffen <grobian@gentoo.org>2021-12-23 12:49:16 +0100
commitd898bfafd82926945fded7552f7bf1f89d375d7c (patch)
tree1aa5301aa016bc075e3b30a9df2ccc951c3cf7de /tests
parentRevert "tests/init: force colours off for all tests" (diff)
downloadportage-utils-d898bfafd82926945fded7552f7bf1f89d375d7c.tar.gz
portage-utils-d898bfafd82926945fded7552f7bf1f89d375d7c.tar.bz2
portage-utils-d898bfafd82926945fded7552f7bf1f89d375d7c.zip
tests: drop all -C/NOCOLOR usage
this actually hides a problem, and we don't want that Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/install/dotest2
-rwxr-xr-xtests/profile/dotest6
-rwxr-xr-xtests/qfile/dotest16
-rwxr-xr-xtests/qlist/dotest32
-rwxr-xr-xtests/qmerge/dotest2
-rwxr-xr-xtests/quse/dotest18
6 files changed, 37 insertions, 39 deletions
diff --git a/tests/install/dotest b/tests/install/dotest
index b312f1b..cdbb3b3 100755
--- a/tests/install/dotest
+++ b/tests/install/dotest
@@ -4,7 +4,7 @@
rm -f q
-applets=$(q -Ch | \
+applets=$(q -h | \
sed -n '/^Currently defined applets:/,/^Options/p' | \
grep ' : ' | \
awk '{print $1}'
diff --git a/tests/profile/dotest b/tests/profile/dotest
index 97dc2d1..1da75c0 100755
--- a/tests/profile/dotest
+++ b/tests/profile/dotest
@@ -17,16 +17,14 @@ tenv() {
fi
}
-# clear out env vars that would affect our tests, keep NOCOLOR
-unset $(q -e | cut -d= -f1 | grep -v NOCOLOR)
+# clear out env vars that would affect our tests
+unset $(q -e | cut -d= -f1)
# test vars that should default to known values.
# cannot test too many more as portage's default
# make.globals will kick in. also can't test
# some vars (e.g. PORTAGE_BINHOST) that we default
# on some platforms.
-echo "NOCOLOR=${NOCOLOR}"
-tenv inv NOCOLOR 1
tenv inv ROOT /
tenv inv ARCH
diff --git a/tests/qfile/dotest b/tests/qfile/dotest
index 023630e..25255ee 100755
--- a/tests/qfile/dotest
+++ b/tests/qfile/dotest
@@ -6,28 +6,28 @@ export ROOT=${as}/root
export Q_VDB=/
tests=(
- "qfile -Cq /bin/bash /bin/XXXXX"
+ "qfile -q /bin/bash /bin/XXXXX"
"app-shells/bash"
- "qfile -Co /bin/bash /bin/XXXXX"
+ "qfile -o /bin/bash /bin/XXXXX"
"/bin/XXXXX"
- "qfile -Co -x bash /bin/bash"
+ "qfile -o -x bash /bin/bash"
"/bin/bash"
- "qfile -Co -x app-shells/bash /bin/bash"
+ "qfile -o -x app-shells/bash /bin/bash"
"/bin/bash"
- "qfile -Co -x bash:0 /bin/bash"
+ "qfile -o -x bash:0 /bin/bash"
"/bin/bash"
- "qfile -Co -x app-shells/bash:0 /bin/bash"
+ "qfile -o -x app-shells/bash:0 /bin/bash"
"/bin/bash"
- "(cd ${ROOT}/bin; qfile -RCq bash)"
+ "(cd ${ROOT}/bin; qfile -Rq bash)"
"app-shells/bash"
- "(cd ${ROOT}/; qfile -Co whatever)"
+ "(cd ${ROOT}/; qfile -o whatever)"
"whatever"
)
diff --git a/tests/qlist/dotest b/tests/qlist/dotest
index 509a20d..9afe2ec 100755
--- a/tests/qlist/dotest
+++ b/tests/qlist/dotest
@@ -23,52 +23,52 @@ test() {
}
# simple install check
-test 01 0 "qlist -IC"
+test 01 0 "qlist -I"
# simple files list
-test 02 0 "qlist -C --showdebug cpio"
+test 02 0 "qlist --showdebug cpio"
# symlink verbose list
-test 03 0 "qlist -C --showdebug mtools -e -v"
+test 03 0 "qlist --showdebug mtools -e -v"
# dir test
-test 04 0 "qlist -C --showdebug mtools -d"
+test 04 0 "qlist --showdebug mtools -d"
# obj test
-test 05 0 "qlist -C --showdebug mtools -o"
+test 05 0 "qlist --showdebug mtools -o"
# sym test
-test 06 0 "qlist -C --showdebug mtools -s"
+test 06 0 "qlist --showdebug mtools -s"
# SLOT test
-test 07 0 "qlist -ICS"
+test 07 0 "qlist -IS"
# showdebug test #1
-test 08 0 "qlist -C cpio"
+test 08 0 "qlist cpio"
# dir test
-test 09 0 "qlist -C mtools -d"
+test 09 0 "qlist mtools -d"
# ver test
-test 10 0 "qlist -ICv =mtools-4*"
+test 10 0 "qlist -Iv =mtools-4*"
# repo test
-test 11 0 "qlist -ICR"
+test 11 0 "qlist -IR"
# slot with repo test
-test 12 0 "qlist -ICSR"
+test 12 0 "qlist -ISR"
# exact CAT/PN:slot::repo files list test
-test 13 0 "qlist -Ce --showdebug app-arch/cpio:0::gentoo"
+test 13 0 "qlist -e --showdebug app-arch/cpio:0::gentoo"
# sub-SLOT test
-test 14 0 "qlist -ICSS"
+test 14 0 "qlist -ISS"
# no matches
-test 15 1 "qlist -ICv lajsdflkjasdflkjasdfljasdf"
+test 15 1 "qlist -Iv lajsdflkjasdflkjasdfljasdf"
# match test w/out sub-SLOT
-test 16 0 "qlist -ICSS virtual/sub-2:1"
+test 16 0 "qlist -ISS virtual/sub-2:1"
# check USE retrieval
test 17 0 "qlist -IUv mtools"
diff --git a/tests/qmerge/dotest b/tests/qmerge/dotest
index f715ee5..be91d8f 100755
--- a/tests/qmerge/dotest
+++ b/tests/qmerge/dotest
@@ -21,7 +21,7 @@ mkdir -p "${ROOT}/var/db/pkg"
set +e
# sanity check on environment
-q -Cev
+q -ev
qlist -kIv
# Do a merge into an empty tree.
diff --git a/tests/quse/dotest b/tests/quse/dotest
index 93bef56..7fcbe33 100755
--- a/tests/quse/dotest
+++ b/tests/quse/dotest
@@ -9,8 +9,8 @@ mktmpdir
mkportdir "${as}/portdir"
# check inference of PORTDIR with repos.conf
-q -evC PORTDIR
-q -ovC
+q -ev PORTDIR
+q -ov
d=${PORTDIR}/profiles
entries() {
@@ -21,12 +21,12 @@ entries() {
f="$d/use.desc"
all=$(entries "$f" | awk '{print $1}')
for x in ${all} ; do
- quse -eCD $x > x
+ quse -eD $x > x
sed -n -e "/^$x - /{s|^[^ ]* - |global[$x] |;p}" "$f" > good
cat good >> all.good
diff -u good x
done
-quse -eCD ${all} > x
+quse -eD ${all} > x
diff -u all.good x
rm x good all.good
tpass "use.desc"
@@ -35,12 +35,12 @@ tpass "use.desc"
f="$d/use.local.desc"
all=$(entries "$f" | awk '{print $1}' | cut -f2 -d:)
for x in ${all} ; do
- quse -eCD $x > x
+ quse -eD $x > x
sed -n -e "/^[^:]*:$x - /{s|^\([^:]*\):[^ ]* - |\1[$x] |;p}" "$f" > good
cat good >> all.good
diff -u good x
done
-quse -eCD ${all} > x
+quse -eD ${all} > x
diff -u all.good x
rm x good all.good
tpass "use.local.desc"
@@ -49,7 +49,7 @@ tpass "use.local.desc"
f="$d/desc/elibc.desc"
all=$(entries "$f" | awk '{print $1}')
for x in ${all} ; do
- quse -eCD $x > x
+ quse -eD $x > x
dispf=${f##*/}
dispf=${dispf%.desc}
dispf=${dispf^^}
@@ -57,7 +57,7 @@ for x in ${all} ; do
cat good >> all.good
diff -u good x
done
-quse -eCD ${all} > x
+quse -eD ${all} > x
diff -u all.good x
rm x good all.good
tpass "desc/elibc.desc"
@@ -66,7 +66,7 @@ tpass "desc/elibc.desc"
# sort because quse order depends on the readdir order
# which depends on the fs itself. quse doesnt do sorting
# because in general, who cares. faster this way.
-quse -CD abc | LC_ALL=C sort > x
+quse -D abc | LC_ALL=C sort > x
diff -u ${as}/list01.good x
rm x
tpass "multi file match"