From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 781AA1391DB for ; Sat, 15 Mar 2014 06:11:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 54242E0AD5; Sat, 15 Mar 2014 06:11:50 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C8F93E0AD5 for ; Sat, 15 Mar 2014 06:11:49 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CE18533FB12 for ; Sat, 15 Mar 2014 06:11:48 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 8AD7218875 for ; Sat, 15 Mar 2014 06:11:47 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1394863735.9bae188fc6e976f3edcf712ee92c19e996a578bf.vapier@gentoo> Subject: [gentoo-commits] proj/portage-utils:master commit in: tests/qdepends/root/app-arch/cpio-2.11/, ... X-VCS-Repository: proj/portage-utils X-VCS-Files: tests/qdepends/dotest tests/qdepends/list07.good tests/qdepends/root/app-arch/cpio-2.11/CONTENTS tests/qdepends/root/app-arch/cpio-2.11/SLOT tests/qdepends/root/app-arch/cpio-2.11/repository tests/qdepends/root/x11-apps/xdm-1.1.11-r3/DEPEND tests/qdepends/root/x11-apps/xdm-1.1.11-r3/RDEPEND tests/qdepends/root/x11-apps/xdm-1.1.11-r3/USE X-VCS-Directories: tests/qdepends/root/app-arch/cpio-2.11/ tests/qdepends/root/x11-apps/xdm-1.1.11-r3/ tests/qdepends/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 9bae188fc6e976f3edcf712ee92c19e996a578bf X-VCS-Branch: master Date: Sat, 15 Mar 2014 06:11:47 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: a4566505-1003-42c8-8d8c-a4010e9bddba X-Archives-Hash: 33c358ff989cc57f635be31c0269aade commit: 9bae188fc6e976f3edcf712ee92c19e996a578bf Author: Mike Frysinger gentoo org> AuthorDate: Sat Mar 15 06:08:55 2014 +0000 Commit: Mike Frysinger gentoo 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-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 !