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 1QpcHz-0007L1-11 for garchives@archives.gentoo.org; Sat, 06 Aug 2011 08:31:23 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2322421C0FB; Sat, 6 Aug 2011 08:31:11 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id E981621C0FB for ; Sat, 6 Aug 2011 08:31:10 +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 8229B1B4034 for ; Sat, 6 Aug 2011 08:31:10 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 8421480040 for ; Sat, 6 Aug 2011 08:31:09 +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: 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/banned_commands.py X-VCS-Directories: pmstestsuite/library/standard/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: ddaeea47f4a7f3b034ac2db998aedb0cfc3e82cf Date: Sat, 6 Aug 2011 08:31:09 +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: b55c9104223d38575c61ad5e17576580 commit: ddaeea47f4a7f3b034ac2db998aedb0cfc3e82cf Author: Micha=C5=82 G=C3=B3rny gentoo org> AuthorDate: Sat Aug 6 08:02:03 2011 +0000 Commit: Micha=C5=82 G=C3=B3rny gentoo org> CommitDate: Sat Aug 6 08:03:31 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/pms-test-suit= e.git;a=3Dcommit;h=3Dddaeea47 Add additional checks for dohard & dosed. --- pmstestsuite/library/standard/banned_commands.py | 27 ++++++++++++++++= +---- 1 files changed, 22 insertions(+), 5 deletions(-) diff --git a/pmstestsuite/library/standard/banned_commands.py b/pmstestsu= ite/library/standard/banned_commands.py index 114089b..456b055 100644 --- a/pmstestsuite/library/standard/banned_commands.py +++ b/pmstestsuite/library/standard/banned_commands.py @@ -11,7 +11,7 @@ class BannedCommandTest(DBusEbuildTestCase): DBusEbuildTestCase.__init__(self, *args, **kwargs) self._path =3D '/tmp/pms-test-suite-%d' % id(self) self.phase_funcs['src_install'].extend([ - 'touch foo || die', + '{ echo > foo; } || die', 'insinto %s' % self._path, 'doins foo || die' ]) @@ -22,13 +22,30 @@ class DoHardCommandTest(BannedCommandTest): =20 def __init__(self, *args, **kwargs): BannedCommandTest.__init__(self, *args, **kwargs) - self.phase_funcs['src_install'].append( - 'dohard %s/foo %s/bar || die' % (self._path, self._path)) + self.phase_funcs['src_install'].extend([ + 'dohard %s/foo %s/bar || die' % (self._path, self._path), + '[[ "${D}"%s/foo -ef "${D}"%s/bar ]]' % (self._path, self._path), + 'pms-test-dbus_append_result ${?}']) + + def check_dbus_result(self, output, pm): + try: + BannedCommandTest.check_dbus_result(self, output, pm) + finally: + # XXX: ambiguous in EAPI 4 + self.assertTrue(output[0] =3D=3D '0', 'hardlink created') =20 class DoSedCommandTest(BannedCommandTest): """ Test whether dosed command is actually banned. """ =20 def __init__(self, *args, **kwargs): BannedCommandTest.__init__(self, *args, **kwargs) - self.phase_funcs['src_install'].append( - 'dosed -e "/11/d" %s/foo || die' % self._path) + self.phase_funcs['src_install'].extend([ + "dosed -e '$i SED WORKED' %s/foo || die" % self._path, + 'pms-test-dbus_append_result "$(cat "${D}"%s/foo)"' % self._path]) + + def check_dbus_result(self, output, pm): + try: + BannedCommandTest.check_dbus_result(self, output, pm) + finally: + # XXX: ambiguous in EAPI 4 + self.assertEqual(output[0].strip(), 'SED WORKED', 'dosed result')