aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2011-08-08 04:58:03 +0200
committerMichał Górny <mgorny@gentoo.org>2011-08-08 04:58:03 +0200
commit12c6e80b9d7b6b0ef613d9a716547d2da1e675e4 (patch)
treee1663d6eea137e4fac587d24ca5b9e79962a61f2 /pmstestsuite/library
parentFix INHERITED varname (in output). (diff)
downloadpms-test-suite-12c6e80b9d7b6b0ef613d9a716547d2da1e675e4.tar.gz
pms-test-suite-12c6e80b9d7b6b0ef613d9a716547d2da1e675e4.tar.bz2
pms-test-suite-12c6e80b9d7b6b0ef613d9a716547d2da1e675e4.zip
dohard: check whether hardlink was preserved after merge.
Diffstat (limited to 'pmstestsuite/library')
-rw-r--r--pmstestsuite/library/standard/banned_commands.py19
1 files changed, 18 insertions, 1 deletions
diff --git a/pmstestsuite/library/standard/banned_commands.py b/pmstestsuite/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._path),
+ 'pms-test-dbus_append_result ${?}'])
def check_dbus_result(self, output, pm):
try:
@@ -41,10 +44,24 @@ class DoHardCommandTest(BannedCommandTest):
res = None
if self.eapi < 4:
- self.assertTrue(res, 'hardlink created')
+ try:
+ self.assertTrue(res, 'hardlink created')
+ except AssertionError as e:
+ if exc is None:
+ exc = e
+ try:
+ self.assertTrue(output[1] == '0', 'hardlink preserved after merge',
+ undefined = True)
+ except IndexError:
+ pass
elif res is not None or exc:
self.assertFalse(res, 'hardlink created',
undefined = True)
+ try:
+ self.assertFalse(output[1] == '0', 'hardlink preserved after merge',
+ undefined = True)
+ except IndexError:
+ pass
if exc:
raise exc