From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QbuLQ-0000LH-Lf for garchives@archives.gentoo.org; Wed, 29 Jun 2011 12:58:16 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BC2361C033; Wed, 29 Jun 2011 12:58:08 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 7C5531C033 for ; Wed, 29 Jun 2011 12:58:08 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id F35881B4051 for ; Wed, 29 Jun 2011 12:58:07 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 52FEB8003E for ; Wed, 29 Jun 2011 12:58:07 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <6f30312d03eed2ac0317bbf0afab11b9f6d9313d.mgorny@gentoo> Subject: [gentoo-commits] proj/pms-test-suite:master commit in: pmstestsuite/library/standard/ X-VCS-Repository: proj/pms-test-suite X-VCS-Files: pmstestsuite/library/standard/deprecated_vars.py pmstestsuite/library/standard/ext_cases.py pmstestsuite/library/standard/workdir_fallback.py X-VCS-Directories: pmstestsuite/library/standard/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 6f30312d03eed2ac0317bbf0afab11b9f6d9313d Date: Wed, 29 Jun 2011 12:58:07 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 77025314f5c3cb6a54bfd2beae624405 commit: 6f30312d03eed2ac0317bbf0afab11b9f6d9313d Author: Micha=C5=82 G=C3=B3rny gentoo org> AuthorDate: Wed Jun 29 12:25:54 2011 +0000 Commit: Micha=C5=82 G=C3=B3rny gentoo org> CommitDate: Wed Jun 29 12:25:54 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/pms-test-suit= e.git;a=3Dcommit;h=3D6f30312d Add a common DBusFetchingEbuildTestCase. --- pmstestsuite/library/standard/deprecated_vars.py | 12 ++++++++---- pmstestsuite/library/standard/ext_cases.py | 19 +++++++++++++++= ++++ pmstestsuite/library/standard/workdir_fallback.py | 7 +++---- 3 files changed, 30 insertions(+), 8 deletions(-) diff --git a/pmstestsuite/library/standard/deprecated_vars.py b/pmstestsu= ite/library/standard/deprecated_vars.py index c4c72a3..fce66f9 100644 --- a/pmstestsuite/library/standard/deprecated_vars.py +++ b/pmstestsuite/library/standard/deprecated_vars.py @@ -3,15 +3,14 @@ # Released under the terms of the 2-clause BSD license. =20 from pmstestsuite.library.standard.dbus_case import DBusEbuildTestCase +from pmstestsuite.library.standard.ext_cases import DBusFetchingEbuildTe= stCase =20 -class AATest(DBusEbuildTestCase): +class AATest(DBusFetchingEbuildTestCase): """ Test whether AA is declared. """ =20 relevant_eapis =3D (3, 4) ebuild_vars =3D { - 'IUSE': 'pms_tests_magical_hidden_use', # XXX? - 'SRC_URI': '''pms_tests_magical_hidden_use? ( - http://www.gentoo.org/ -> pms-test-suite-dummy.html )''' + 'IUSE': 'pms_tests_magical_hidden_use' # XXX? } phase_funcs =3D { 'src_unpack': [ @@ -19,6 +18,11 @@ class AATest(DBusEbuildTestCase): ] } =20 + def __init__(self, *args, **kwargs): + DBusFetchingEbuildTestCase.__init__(self, *args, **kwargs) + self.ebuild_vars['SRC_URI'] =3D 'pms_tests_magical_hidden_use? ( %s )'= \ + % self.ebuild_vars['SRC_URI'] + def check_dbus_result(self, output, pm): if self.eapi < 4: expect =3D 'pms-test-suite-dummy.html' diff --git a/pmstestsuite/library/standard/ext_cases.py b/pmstestsuite/li= brary/standard/ext_cases.py new file mode 100644 index 0000000..d1d5eb6 --- /dev/null +++ b/pmstestsuite/library/standard/ext_cases.py @@ -0,0 +1,19 @@ +# vim:fileencoding=3Dutf-8 +# (c) 2011 Micha=C5=82 G=C3=B3rny +# Released under the terms of the 2-clause BSD license. + +from pmstestsuite.library.standard.dbus_case import DBusEbuildTestCase + +class DBusFetchingEbuildTestCase(DBusEbuildTestCase): + """ + A DBusEbuildTestCase variant with a standarized way of fetching + sources -- to decrease ${DISTDIR} pollution. + """ + + def __init__(self, *args, **kwargs): + DBusEbuildTestCase.__init__(self, *args, **kwargs) + # XXX: switch to a dedicated file without the arrow + val =3D 'http://www.gentoo.org/ -> pms-test-suite-dummy.html' + if 'SRC_URI' in self.ebuild_vars: + val =3D '%s %s' % (self.ebuild_vars['SRC_URI'], val) + self.ebuild_vars['SRC_URI'] =3D val diff --git a/pmstestsuite/library/standard/workdir_fallback.py b/pmstests= uite/library/standard/workdir_fallback.py index 142c33c..96cd2e8 100644 --- a/pmstestsuite/library/standard/workdir_fallback.py +++ b/pmstestsuite/library/standard/workdir_fallback.py @@ -2,9 +2,9 @@ # (c) 2011 Micha=C5=82 G=C3=B3rny # Released under the terms of the 2-clause BSD license. =20 -from pmstestsuite.library.standard.dbus_case import DBusEbuildTestCase +from pmstestsuite.library.standard.ext_cases import DBusFetchingEbuildTe= stCase =20 -class WorkdirFallbackTest(DBusEbuildTestCase): +class WorkdirFallbackTest(DBusFetchingEbuildTestCase): """ S=3D${WORKDIR} fallback test. """ =20 relevant_eapis =3D (2, 4) @@ -15,7 +15,6 @@ class WorkdirFallbackTest(DBusEbuildTestCase): # 3) have one of the further phase funcs. =20 ebuild_vars =3D { - 'SRC_URI': 'http://www.gentoo.org/ -> pms-test-suite-dummy.html', 'S': '${WORKDIR}/nonexistent' } phase_funcs =3D { @@ -28,5 +27,5 @@ class WorkdirFallbackTest(DBusEbuildTestCase): } =20 def __init__(self, *args, **kwargs): - DBusEbuildTestCase.__init__(self, *args, **kwargs) + DBusFetchingEbuildTestCase.__init__(self, *args, **kwargs) self.expect_failure =3D (self.eapi =3D=3D 4)