summaryrefslogtreecommitdiff
path: root/dev-python/OutputCheck/OutputCheck-0.4.2.ebuild
blob: d1ec3ff584bab2cbe147ba9481cf5850586bbb50 (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
37
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{8..10} )

inherit distutils-r1

DESCRIPTION="A tool for checking the output of console programs inspired by LLVM's FileCheck"
HOMEPAGE="https://github.com/stp/OutputCheck/"
SRC_URI="https://github.com/stp/${PN}/archive/${PV}.tar.gz -> ${P}.gh.tar.gz"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="test"
RESTRICT="!test? ( test )"

BDEPEND="test? ( dev-python/lit[${PYTHON_USEDEP}] )"

src_prepare() {
	distutils-r1_src_prepare

	# Remove bad tests.
	rm "${S}"/tests/invalid-regex-syntax.smt2 ||
		die "failed to remove bad tests"

	# Create RELEASE-VERSION file.
	echo ${PV} > "${S}"/RELEASE-VERSION ||
		die "failed to write RELEASE-VERSION"
}

python_test() {
	lit "${S}"/tests || die "running test with ${EPYTHON} failed"
}