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 1QqG1c-0004jM-2L for garchives@archives.gentoo.org; Mon, 08 Aug 2011 02:57:08 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DCB5D21C055; Mon, 8 Aug 2011 02:56:56 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 9D85721C055 for ; Mon, 8 Aug 2011 02:56:56 +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 109621B400D for ; Mon, 8 Aug 2011 02:56:56 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 3FDC680040 for ; Mon, 8 Aug 2011 02:56:55 +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: <12c6e80b9d7b6b0ef613d9a716547d2da1e675e4.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/banned_commands.py X-VCS-Directories: pmstestsuite/library/standard/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 12c6e80b9d7b6b0ef613d9a716547d2da1e675e4 Date: Mon, 8 Aug 2011 02:56:55 +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: f57ad839814ef2b63867ddcbf620c100 commit: 12c6e80b9d7b6b0ef613d9a716547d2da1e675e4 Author: Micha=C5=82 G=C3=B3rny gentoo org> AuthorDate: Mon Aug 8 02:58:03 2011 +0000 Commit: Micha=C5=82 G=C3=B3rny gentoo org> CommitDate: Mon Aug 8 02:58:03 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/pms-test-suit= e.git;a=3Dcommit;h=3D12c6e80b dohard: check whether hardlink was preserved after merge. --- pmstestsuite/library/standard/banned_commands.py | 19 ++++++++++++++++= ++- 1 files changed, 18 insertions(+), 1 deletions(-) diff --git a/pmstestsuite/library/standard/banned_commands.py b/pmstestsu= ite/library/standard/banned_commands.py index b261f43..bf7a715 100644 --- a/pmstestsuite/library/standard/banned_commands.py +++ b/pmstestsuite/library/standard/banned_commands.py @@ -26,6 +26,9 @@ class DoHardCommandTest(BannedCommandTest): '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 ${?}']) + self.phase_funcs['pkg_postinst'].extend([ + '[[ "${ROOT}"%s/foo -ef "${ROOT}"%s/bar ]]' % (self._path, self._pat= h), + 'pms-test-dbus_append_result ${?}']) =20 def check_dbus_result(self, output, pm): try: @@ -41,10 +44,24 @@ class DoHardCommandTest(BannedCommandTest): res =3D None =20 if self.eapi < 4: - self.assertTrue(res, 'hardlink created') + try: + self.assertTrue(res, 'hardlink created') + except AssertionError as e: + if exc is None: + exc =3D e + try: + self.assertTrue(output[1] =3D=3D '0', 'hardlink preserved after merg= e', + undefined =3D True) + except IndexError: + pass elif res is not None or exc: self.assertFalse(res, 'hardlink created', undefined =3D True) + try: + self.assertFalse(output[1] =3D=3D '0', 'hardlink preserved after mer= ge', + undefined =3D True) + except IndexError: + pass =20 if exc: raise exc