dev-python/lit: Support running self-tests
authorMichał Górny <mgorny@gentoo.org>
Mon, 3 Oct 2016 16:23:33 +0000 (18:23 +0200)
committerMichał Górny <mgorny@gentoo.org>
Mon, 3 Oct 2016 16:37:42 +0000 (18:37 +0200)
dev-python/lit/lit-9999.ebuild

index 90492901184f337e261031c9f7eadf6db0ab0aa2..c98d8f20b11d005ebecd210e4227a6f0e77094a7 100644 (file)
@@ -16,8 +16,18 @@ EGIT_REPO_URI="http://llvm.org/git/llvm.git
 LICENSE="UoI-NCSA"
 SLOT="0"
 KEYWORDS=""
-IUSE=""
+IUSE="test"
 
 S=${WORKDIR}/${P}/utils/lit
 
+# Tests require 'FileCheck' and 'not' utilities (from llvm)
+DEPEND="
+       test? (
+               dev-python/psutil[${PYTHON_USEDEP}]
+               sys-devel/llvm )"
+
 # TODO: move the manpage generation here (from sys-devel/llvm)
+
+python_test() {
+       ./lit.py -sv tests || die
+}