commit: 555eff4c66aad27a02fbf8edffa0820d2bdbdfb6
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 9 18:20:20 2019 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sun Jun 9 18:20:20 2019 +0000
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=555eff4c
tests/atom_explode: don't use Portage install
relying on actual data can reveal all kinds of problems which may be
unrelated to atom parsing
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
tests/atom_explode/dotest | 31 ++++++++-----------------------
1 file changed, 8 insertions(+), 23 deletions(-)
diff --git a/tests/atom_explode/dotest b/tests/atom_explode/dotest
index f47d44f..8302529 100755
--- a/tests/atom_explode/dotest
+++ b/tests/atom_explode/dotest
@@ -2,34 +2,19 @@
. ../init.sh || exit 1
-PORTDIR=$(DEBUG=: q -Ch 2>&1 | grep ^PORTDIR | awk '{print $NF}')
-if [[ -z ${TRAVIS_OS_NAME} && -d "${PORTDIR}"/metadata/md5-cache ]] &&
- "$s"/atom-explode.py < /dev/null >& /dev/null ;
-then
- pushd "${PORTDIR}"/metadata/md5-cache >/dev/null || exit $?
-
- if [[ $1 == -v ]] ; then
- find . -mindepth 2 -type f -printf '%P\n%f\n' | while read line
; do
- echo "TESTING $line: "
- "$b"/e "${line}"
- done
- exit 0
- fi
-
- # split the disk i/o out so both tests are CPU bound only
- files=$(find . -mindepth 2 -type f ! -name "Manifest.*" -printf
'%P\n%f\n')
- popd >/dev/null
-else
- files=$(xzcat ebuildlist.xz)
-fi
+files=$(xzcat ebuildlist.xz)
printf "atom_explode():"
time echo "${files}" | "$b"/e > "$b"/me || exit $?
echo
-printf "portage:"
-time echo "${files}" | "$s"/atom-explode.py > "$b"/py || xzcat portageatoms.xz
> "$b"/py
-echo
+if [[ -n ${QATOM_COMPARE_TO_PORTAGE} ]] ; then
+ printf "portage:"
+ time echo "${files}" | "$s"/atom-explode.py > "$b"/py
+ echo
+else
+ xzcat portageatoms.xz > "$b"/py
+fi
diff -U 0 "$b"/me "$b"/py
tend $? "portage-utils vs portage atom parsing"