commit:     d858df8a53df7e43bc6c2ece945cff7104ae762b
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 14 01:02:43 2016 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Feb 14 01:02:43 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=d858df8a

tests: atom_explode: get tests running again

Change to extracting PORTDIR from q itself rather than portageq.
This is just putting off the full fix (walking all repos), but it
gets things running/passing again.

After some recent changes, we also need to update the python code
so its output matches the q code.  Otherwise all the tests fail as
none of the lines match.

URL: https://bugs.gentoo.org/567336
Reported-by: tka <AT> kamph.org

 tests/atom_explode/atom-explode.py | 2 +-
 tests/atom_explode/dotest          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/atom_explode/atom-explode.py 
b/tests/atom_explode/atom-explode.py
index 03ea0bf..d28aaed 100755
--- a/tests/atom_explode/atom-explode.py
+++ b/tests/atom_explode/atom-explode.py
@@ -11,7 +11,7 @@ def doit(a):
        PV = cpv[2]
        PR_int = cpv[3]
        P = PN + "-" + PV
-       PVR = P + "-" + cpv[3]
+       PVR = PV + "-" + cpv[3]
        print(a+" -> "+CATEGORY+" / ["+P+"] "+PN+" - "+PVR+" ["+PV+"] 
["+PR_int+"]")
 
 for a in sys.argv[1:]:

diff --git a/tests/atom_explode/dotest b/tests/atom_explode/dotest
index 41d282a..e852bc0 100755
--- a/tests/atom_explode/dotest
+++ b/tests/atom_explode/dotest
@@ -2,7 +2,7 @@
 
 . ../init.sh || exit 1
 
-: ${PORTDIR:=$(portageq envvar PORTDIR)}
+PORTDIR=$(DEBUG=: q -Ch 2>&1 | grep ^PORTDIR | awk '{print $NF}')
 pushd "${PORTDIR}"/metadata/md5-cache >/dev/null || { echo SKIPPED; exit 0 ; }
 
 if [[ $1 == -v ]] ; then

Reply via email to