* [gentoo-commits] proj/portage-utils:master commit in: tests/qdepends/root/app-arch/cpio-2.11/, ...
@ 2014-03-15 6:11 Mike Frysinger
0 siblings, 0 replies; only message in thread
From: Mike Frysinger @ 2014-03-15 6:11 UTC (permalink / raw
To: gentoo-commits
commit: 9bae188fc6e976f3edcf712ee92c19e996a578bf
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 15 06:08:55 2014 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sat Mar 15 06:08:55 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage-utils.git;a=commit;h=9bae188f
tests: qdepends: add a -Q test
---
tests/qdepends/dotest | 28 +++++++++++++++-------
tests/qdepends/list07.good | 1 +
tests/qdepends/root/app-arch/cpio-2.11/CONTENTS | 22 +++++++++++++++++
tests/qdepends/root/app-arch/cpio-2.11/SLOT | 1 +
tests/qdepends/root/app-arch/cpio-2.11/repository | 1 +
tests/qdepends/root/x11-apps/xdm-1.1.11-r3/DEPEND | 1 +
tests/qdepends/root/x11-apps/xdm-1.1.11-r3/RDEPEND | 1 +
tests/qdepends/root/x11-apps/xdm-1.1.11-r3/USE | 1 +
8 files changed, 47 insertions(+), 9 deletions(-)
diff --git a/tests/qdepends/dotest b/tests/qdepends/dotest
index d723228..cb1f457 100755
--- a/tests/qdepends/dotest
+++ b/tests/qdepends/dotest
@@ -4,11 +4,14 @@
set -e
+export ROOT=${as}/root
+export Q_VDB=/
+
mktmpdir
test() {
- local num=$1 dep=$2 exp=${3:-0} ret
- local cmd=( qdepends -f "${dep}" )
+ local num=$1 exp=$2 ret
+ local cmd=( qdepends "${@:3}" )
"${cmd[@]}" >& list && ret=0 || ret=$?
if [[ ${ret} -ne ${exp} ]] ; then
@@ -26,18 +29,25 @@ test() {
tend $? "${cmd[*]}"
}
+testf() { test "$1" "${3:-0}" -f "$2"; }
+
# basic sanity checks
-test 00 '|' 1
-test 01 ''
-test 02 'a/b'
-test 03 'foo? ( a/b )'
-test 04 '|| ( a/b )'
+testf 00 '|' 1
+testf 01 ''
+testf 02 'a/b'
+testf 03 'foo? ( a/b )'
+testf 04 '|| ( a/b )'
# a bit more complicated with or deps
-test 05 '|| ( || ( || ( x ) a ) )'
+testf 05 '|| ( || ( || ( x ) a ) )'
# hande use deps on atoms #470180
-test 06 'a[foo(+)]'
+testf 06 'a[foo(+)]'
+
+testQ() { test "$1" "${3:-0}" -Q "$2"; }
+
+# reverse checks #504636
+testQ 07 xinit
cleantmpdir
diff --git a/tests/qdepends/list07.good b/tests/qdepends/list07.good
new file mode 100644
index 0000000..4aaea04
--- /dev/null
+++ b/tests/qdepends/list07.good
@@ -0,0 +1 @@
+x11-apps/xdm-1.1.11-r3
diff --git a/tests/qdepends/root/app-arch/cpio-2.11/CONTENTS b/tests/qdepends/root/app-arch/cpio-2.11/CONTENTS
new file mode 100644
index 0000000..d29a2e6
--- /dev/null
+++ b/tests/qdepends/root/app-arch/cpio-2.11/CONTENTS
@@ -0,0 +1,22 @@
+dir /bin
+obj /bin/cpio 2d0175bda0d523cb1866f2a86d5e1d36 1279420243
+dir /usr
+dir /usr/share
+dir /usr/share/man
+dir /usr/share/man/man1
+obj /usr/share/man/man1/cpio.1.lzma 59ce265e35d90956a01681a410321dca 1279420242
+dir /usr/share/doc
+dir /usr/share/doc/cpio-2.11
+obj /usr/share/doc/cpio-2.11/ChangeLog.lzma e4c19516c2281dcae742d629481963cf 1279420242
+obj /usr/share/doc/cpio-2.11/NEWS.lzma 65222bcc052d4493e2f686bea7b391b3 1279420242
+obj /usr/share/doc/cpio-2.11/README.lzma 78234895f4a2f4ffabf3454d7b09d3d7 1279420242
+dir /usr/share/locale
+dir /usr/share/locale/de
+dir /usr/share/locale/de/LC_MESSAGES
+obj /usr/share/locale/de/LC_MESSAGES/cpio.mo e70bf4aad229f9f5c491f525601631b7 1279420242
+dir /usr/share/info
+obj /usr/share/info/cpio.info.lzma ad50ca81ccb87d49e84a46fb6d3fbb7f 1279420242
+dir /usr/lib
+dir /usr/lib/debug
+dir /usr/lib/debug/bin
+obj /usr/lib/debug/bin/cpio.debug 9da741b0b5cd1d997623feb674301b08 1279420243
diff --git a/tests/qdepends/root/app-arch/cpio-2.11/SLOT b/tests/qdepends/root/app-arch/cpio-2.11/SLOT
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tests/qdepends/root/app-arch/cpio-2.11/SLOT
@@ -0,0 +1 @@
+0
diff --git a/tests/qdepends/root/app-arch/cpio-2.11/repository b/tests/qdepends/root/app-arch/cpio-2.11/repository
new file mode 100644
index 0000000..23574f3
--- /dev/null
+++ b/tests/qdepends/root/app-arch/cpio-2.11/repository
@@ -0,0 +1 @@
+gentoo
diff --git a/tests/qdepends/root/x11-apps/xdm-1.1.11-r3/DEPEND b/tests/qdepends/root/x11-apps/xdm-1.1.11-r3/DEPEND
new file mode 100644
index 0000000..683cfd3
--- /dev/null
+++ b/tests/qdepends/root/x11-apps/xdm-1.1.11-r3/DEPEND
@@ -0,0 +1 @@
+x11-apps/xrdb x11-libs/libXdmcp x11-libs/libXaw >=x11-apps/xinit-1.0.2-r3 x11-libs/libXinerama x11-libs/libXmu x11-libs/libX11 x11-libs/libXt x11-apps/sessreg x11-apps/xconsole !<sys-apps/systemd-187 x11-proto/xineramaproto x11-proto/xproto || ( >=sys-devel/automake-1.12:1.12 >=sys-devel/automake-1.13:1.13 ) >=sys-devel/autoconf-2.68 sys-devel/libtool >=sys-devel/libtool-2.2.6a sys-devel/m4 >=x11-misc/util-macros-1.17 >=media-fonts/font-util-1.2.0 virtual/pkgconfig virtual/pkgconfig
diff --git a/tests/qdepends/root/x11-apps/xdm-1.1.11-r3/RDEPEND b/tests/qdepends/root/x11-apps/xdm-1.1.11-r3/RDEPEND
new file mode 100644
index 0000000..50e1a6e
--- /dev/null
+++ b/tests/qdepends/root/x11-apps/xdm-1.1.11-r3/RDEPEND
@@ -0,0 +1 @@
+x11-apps/xrdb x11-libs/libXdmcp x11-libs/libXaw >=x11-apps/xinit-1.0.2-r3 x11-libs/libXinerama x11-libs/libXmu x11-libs/libX11 x11-libs/libXt x11-apps/sessreg x11-apps/xconsole !<sys-apps/systemd-187
diff --git a/tests/qdepends/root/x11-apps/xdm-1.1.11-r3/USE b/tests/qdepends/root/x11-apps/xdm-1.1.11-r3/USE
new file mode 100644
index 0000000..af7272a
--- /dev/null
+++ b/tests/qdepends/root/x11-apps/xdm-1.1.11-r3/USE
@@ -0,0 +1 @@
+amd64 elibc_glibc ipv6 kernel_linux userland_GNU
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-03-15 6:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-15 6:11 [gentoo-commits] proj/portage-utils:master commit in: tests/qdepends/root/app-arch/cpio-2.11/, Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox