commit:     8ffeecf0d401e933717ca5cebd916bf3dbd081f2
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Wed Jul  3 19:43:25 2024 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Wed Jul  3 19:43:25 2024 +0000
URL:        https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=8ffeecf0

tests: allow running out of sourcetree

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 tests/atom_explode/Makefile.in | 2 ++
 tests/atom_explode/dotest      | 4 ++--
 tests/qdepends/dotest          | 2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/tests/atom_explode/Makefile.in b/tests/atom_explode/Makefile.in
index 5ecc226..b52fcf5 100644
--- a/tests/atom_explode/Makefile.in
+++ b/tests/atom_explode/Makefile.in
@@ -360,6 +360,7 @@ DIR_HAS_FD_MEMBER = @DIR_HAS_FD_MEMBER@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
+EGREP = @EGREP@
 EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@
 EMULTIHOP_VALUE = @EMULTIHOP_VALUE@
 ENOLINK_HIDDEN = @ENOLINK_HIDDEN@
@@ -823,6 +824,7 @@ GL_GNULIB__EXIT = @GL_GNULIB__EXIT@
 GNULIBHEADERS_OVERRIDE_WINT_T = @GNULIBHEADERS_OVERRIDE_WINT_T@
 GPGME_CFLAGS = @GPGME_CFLAGS@
 GPGME_LIBS = @GPGME_LIBS@
+GREP = @GREP@
 HAVE_ACOSF = @HAVE_ACOSF@
 HAVE_ACOSL = @HAVE_ACOSL@
 HAVE_ALIGNED_ALLOC = @HAVE_ALIGNED_ALLOC@

diff --git a/tests/atom_explode/dotest b/tests/atom_explode/dotest
index 8302529..6c529fe 100755
--- a/tests/atom_explode/dotest
+++ b/tests/atom_explode/dotest
@@ -2,7 +2,7 @@
 
 . ../init.sh || exit 1
 
-files=$(xzcat ebuildlist.xz)
+files=$(xzcat "${as}"/ebuildlist.xz)
 
 printf "atom_explode():"
 time echo "${files}" | "$b"/e > "$b"/me || exit $?
@@ -13,7 +13,7 @@ if [[ -n ${QATOM_COMPARE_TO_PORTAGE} ]] ; then
        time echo "${files}" | "$s"/atom-explode.py > "$b"/py
        echo
 else
-       xzcat portageatoms.xz > "$b"/py
+       xzcat "${as}"/portageatoms.xz > "$b"/py
 fi
 
 diff -U 0 "$b"/me "$b"/py

diff --git a/tests/qdepends/dotest b/tests/qdepends/dotest
index ebf0e81..6517e01 100755
--- a/tests/qdepends/dotest
+++ b/tests/qdepends/dotest
@@ -40,7 +40,7 @@ test() {
        if [[ ! -e ${good} ]] ; then
                cp list "${good}"
        fi
-       diff -u list "${good}"
+       diff -u --label "${cmd[*]}" list "${good}"
        tend $? "${num} ${cmd[*]}"
 }
 

Reply via email to