Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage-utils:master commit in: tests/profile/, tests/qfile/, tests/quse/, tests/qlist/, tests/qmerge/, ...
Date: Thu, 23 Dec 2021 12:55:48
Message-Id: 1640260156.d898bfafd82926945fded7552f7bf1f89d375d7c.grobian@gentoo
1 commit: d898bfafd82926945fded7552f7bf1f89d375d7c
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Thu Dec 23 11:49:16 2021 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Thu Dec 23 11:49:16 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=d898bfaf
7
8 tests: drop all -C/NOCOLOR usage
9
10 this actually hides a problem, and we don't want that
11
12 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
13
14 tests/install/dotest | 2 +-
15 tests/profile/dotest | 6 ++----
16 tests/qfile/dotest | 16 ++++++++--------
17 tests/qlist/dotest | 32 ++++++++++++++++----------------
18 tests/qmerge/dotest | 2 +-
19 tests/quse/dotest | 18 +++++++++---------
20 6 files changed, 37 insertions(+), 39 deletions(-)
21
22 diff --git a/tests/install/dotest b/tests/install/dotest
23 index b312f1b..cdbb3b3 100755
24 --- a/tests/install/dotest
25 +++ b/tests/install/dotest
26 @@ -4,7 +4,7 @@
27
28 rm -f q
29
30 -applets=$(q -Ch | \
31 +applets=$(q -h | \
32 sed -n '/^Currently defined applets:/,/^Options/p' | \
33 grep ' : ' | \
34 awk '{print $1}'
35
36 diff --git a/tests/profile/dotest b/tests/profile/dotest
37 index 97dc2d1..1da75c0 100755
38 --- a/tests/profile/dotest
39 +++ b/tests/profile/dotest
40 @@ -17,16 +17,14 @@ tenv() {
41 fi
42 }
43
44 -# clear out env vars that would affect our tests, keep NOCOLOR
45 -unset $(q -e | cut -d= -f1 | grep -v NOCOLOR)
46 +# clear out env vars that would affect our tests
47 +unset $(q -e | cut -d= -f1)
48
49 # test vars that should default to known values.
50 # cannot test too many more as portage's default
51 # make.globals will kick in. also can't test
52 # some vars (e.g. PORTAGE_BINHOST) that we default
53 # on some platforms.
54 -echo "NOCOLOR=${NOCOLOR}"
55 -tenv inv NOCOLOR 1
56 tenv inv ROOT /
57 tenv inv ARCH
58
59
60 diff --git a/tests/qfile/dotest b/tests/qfile/dotest
61 index 023630e..25255ee 100755
62 --- a/tests/qfile/dotest
63 +++ b/tests/qfile/dotest
64 @@ -6,28 +6,28 @@ export ROOT=${as}/root
65 export Q_VDB=/
66
67 tests=(
68 - "qfile -Cq /bin/bash /bin/XXXXX"
69 + "qfile -q /bin/bash /bin/XXXXX"
70 "app-shells/bash"
71
72 - "qfile -Co /bin/bash /bin/XXXXX"
73 + "qfile -o /bin/bash /bin/XXXXX"
74 "/bin/XXXXX"
75
76 - "qfile -Co -x bash /bin/bash"
77 + "qfile -o -x bash /bin/bash"
78 "/bin/bash"
79
80 - "qfile -Co -x app-shells/bash /bin/bash"
81 + "qfile -o -x app-shells/bash /bin/bash"
82 "/bin/bash"
83
84 - "qfile -Co -x bash:0 /bin/bash"
85 + "qfile -o -x bash:0 /bin/bash"
86 "/bin/bash"
87
88 - "qfile -Co -x app-shells/bash:0 /bin/bash"
89 + "qfile -o -x app-shells/bash:0 /bin/bash"
90 "/bin/bash"
91
92 - "(cd ${ROOT}/bin; qfile -RCq bash)"
93 + "(cd ${ROOT}/bin; qfile -Rq bash)"
94 "app-shells/bash"
95
96 - "(cd ${ROOT}/; qfile -Co whatever)"
97 + "(cd ${ROOT}/; qfile -o whatever)"
98 "whatever"
99 )
100
101
102 diff --git a/tests/qlist/dotest b/tests/qlist/dotest
103 index 509a20d..9afe2ec 100755
104 --- a/tests/qlist/dotest
105 +++ b/tests/qlist/dotest
106 @@ -23,52 +23,52 @@ test() {
107 }
108
109 # simple install check
110 -test 01 0 "qlist -IC"
111 +test 01 0 "qlist -I"
112
113 # simple files list
114 -test 02 0 "qlist -C --showdebug cpio"
115 +test 02 0 "qlist --showdebug cpio"
116
117 # symlink verbose list
118 -test 03 0 "qlist -C --showdebug mtools -e -v"
119 +test 03 0 "qlist --showdebug mtools -e -v"
120
121 # dir test
122 -test 04 0 "qlist -C --showdebug mtools -d"
123 +test 04 0 "qlist --showdebug mtools -d"
124
125 # obj test
126 -test 05 0 "qlist -C --showdebug mtools -o"
127 +test 05 0 "qlist --showdebug mtools -o"
128
129 # sym test
130 -test 06 0 "qlist -C --showdebug mtools -s"
131 +test 06 0 "qlist --showdebug mtools -s"
132
133 # SLOT test
134 -test 07 0 "qlist -ICS"
135 +test 07 0 "qlist -IS"
136
137 # showdebug test #1
138 -test 08 0 "qlist -C cpio"
139 +test 08 0 "qlist cpio"
140
141 # dir test
142 -test 09 0 "qlist -C mtools -d"
143 +test 09 0 "qlist mtools -d"
144
145 # ver test
146 -test 10 0 "qlist -ICv =mtools-4*"
147 +test 10 0 "qlist -Iv =mtools-4*"
148
149 # repo test
150 -test 11 0 "qlist -ICR"
151 +test 11 0 "qlist -IR"
152
153 # slot with repo test
154 -test 12 0 "qlist -ICSR"
155 +test 12 0 "qlist -ISR"
156
157 # exact CAT/PN:slot::repo files list test
158 -test 13 0 "qlist -Ce --showdebug app-arch/cpio:0::gentoo"
159 +test 13 0 "qlist -e --showdebug app-arch/cpio:0::gentoo"
160
161 # sub-SLOT test
162 -test 14 0 "qlist -ICSS"
163 +test 14 0 "qlist -ISS"
164
165 # no matches
166 -test 15 1 "qlist -ICv lajsdflkjasdflkjasdfljasdf"
167 +test 15 1 "qlist -Iv lajsdflkjasdflkjasdfljasdf"
168
169 # match test w/out sub-SLOT
170 -test 16 0 "qlist -ICSS virtual/sub-2:1"
171 +test 16 0 "qlist -ISS virtual/sub-2:1"
172
173 # check USE retrieval
174 test 17 0 "qlist -IUv mtools"
175
176 diff --git a/tests/qmerge/dotest b/tests/qmerge/dotest
177 index f715ee5..be91d8f 100755
178 --- a/tests/qmerge/dotest
179 +++ b/tests/qmerge/dotest
180 @@ -21,7 +21,7 @@ mkdir -p "${ROOT}/var/db/pkg"
181 set +e
182
183 # sanity check on environment
184 -q -Cev
185 +q -ev
186 qlist -kIv
187
188 # Do a merge into an empty tree.
189
190 diff --git a/tests/quse/dotest b/tests/quse/dotest
191 index 93bef56..7fcbe33 100755
192 --- a/tests/quse/dotest
193 +++ b/tests/quse/dotest
194 @@ -9,8 +9,8 @@ mktmpdir
195 mkportdir "${as}/portdir"
196
197 # check inference of PORTDIR with repos.conf
198 -q -evC PORTDIR
199 -q -ovC
200 +q -ev PORTDIR
201 +q -ov
202
203 d=${PORTDIR}/profiles
204 entries() {
205 @@ -21,12 +21,12 @@ entries() {
206 f="$d/use.desc"
207 all=$(entries "$f" | awk '{print $1}')
208 for x in ${all} ; do
209 - quse -eCD $x > x
210 + quse -eD $x > x
211 sed -n -e "/^$x - /{s|^[^ ]* - |global[$x] |;p}" "$f" > good
212 cat good >> all.good
213 diff -u good x
214 done
215 -quse -eCD ${all} > x
216 +quse -eD ${all} > x
217 diff -u all.good x
218 rm x good all.good
219 tpass "use.desc"
220 @@ -35,12 +35,12 @@ tpass "use.desc"
221 f="$d/use.local.desc"
222 all=$(entries "$f" | awk '{print $1}' | cut -f2 -d:)
223 for x in ${all} ; do
224 - quse -eCD $x > x
225 + quse -eD $x > x
226 sed -n -e "/^[^:]*:$x - /{s|^\([^:]*\):[^ ]* - |\1[$x] |;p}" "$f" > good
227 cat good >> all.good
228 diff -u good x
229 done
230 -quse -eCD ${all} > x
231 +quse -eD ${all} > x
232 diff -u all.good x
233 rm x good all.good
234 tpass "use.local.desc"
235 @@ -49,7 +49,7 @@ tpass "use.local.desc"
236 f="$d/desc/elibc.desc"
237 all=$(entries "$f" | awk '{print $1}')
238 for x in ${all} ; do
239 - quse -eCD $x > x
240 + quse -eD $x > x
241 dispf=${f##*/}
242 dispf=${dispf%.desc}
243 dispf=${dispf^^}
244 @@ -57,7 +57,7 @@ for x in ${all} ; do
245 cat good >> all.good
246 diff -u good x
247 done
248 -quse -eCD ${all} > x
249 +quse -eD ${all} > x
250 diff -u all.good x
251 rm x good all.good
252 tpass "desc/elibc.desc"
253 @@ -66,7 +66,7 @@ tpass "desc/elibc.desc"
254 # sort because quse order depends on the readdir order
255 # which depends on the fs itself. quse doesnt do sorting
256 # because in general, who cares. faster this way.
257 -quse -CD abc | LC_ALL=C sort > x
258 +quse -D abc | LC_ALL=C sort > x
259 diff -u ${as}/list01.good x
260 rm x
261 tpass "multi file match"