aboutsummaryrefslogtreecommitdiff
blob: 25085db4384ebd46b9387c909c3ff657eb666945 (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
#	vim:fileencoding=utf-8
# (c) 2011 Michał Górny <mgorny@gentoo.org>
# Released under the terms of the 2-clause BSD license.

from pmstestsuite.library.standard.ext_cases import DBusFetchingEbuildTestCase

class WorkdirFallbackTest(DBusFetchingEbuildTestCase):
	""" S=${WORKDIR} fallback test. """

	supported_eapis = (range(0, 4), (4,))

	# In order to disallow S=${WORKDIR} fallback, we need to:
	# 1) have something in ${A} (i.e. fetch something),
	# 2) have src_unpack() of some kind,
	# 3) have one of the further phase funcs.

	ebuild_vars = {
		'S': '${WORKDIR}/nonexistent'
	}
	phase_funcs = {
		'src_unpack': [
			'echo $A'
		],
		'src_compile': [
			':'
		]
	}

	def __init__(self, *args, **kwargs):
		DBusFetchingEbuildTestCase.__init__(self, *args, **kwargs)
		self.expect_failure = (self.eapi == 4)