blob: 0bee1b5ae4229dfbb029e4f6bf9447dc1b0ddbab (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# vim:fileencoding=utf-8
# (c) 2011 Michał Górny <mgorny@gentoo.org>
# Released under the terms of the 2-clause BSD license.
from .dbus_case import DBusEbuildTestCase
class EbuildToucher(DBusEbuildTestCase):
""" Touched file installer (for dependency tests). """
@property
def pv(self):
return id(self)
def __init__(self, *args, **kwargs):
DBusEbuildTestCase.__init__(self, *args, **kwargs)
self.phase_funcs['src_unpack'].append(
'''cat >> mytrue.sh <<_EOF_
#!/bin/sh
true
_EOF_'''
)
self.phase_funcs['src_install'].append(
'newbin mytrue.sh pms-test-suite-%s || die' % self.pv
)
class FailingEbuild(DBusEbuildTestCase):
""" A failing ebuild. """
phase_funcs = {
'src_unpack': ['die']
}
expect_failure = True
@property
def pv(self):
return id(self)
|