diff options
author | Michał Górny <mgorny@gentoo.org> | 2018-05-09 16:21:49 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2018-05-09 16:30:14 +0200 |
commit | b261fdc68a5d1ccbfaa71c6a573b1671db2428a2 (patch) | |
tree | ed3c689182d97f0e5550447b1b96c8799fae320e /dev-util/scons/scons-3.0.1.ebuild | |
parent | dev-util/scons: Bump to 3.0.1 (diff) | |
download | gentoo-b261fdc68a5d1ccbfaa71c6a573b1671db2428a2.tar.gz gentoo-b261fdc68a5d1ccbfaa71c6a573b1671db2428a2.tar.bz2 gentoo-b261fdc68a5d1ccbfaa71c6a573b1671db2428a2.zip |
dev-util/scons: Support running tests
Diffstat (limited to 'dev-util/scons/scons-3.0.1.ebuild')
-rw-r--r-- | dev-util/scons/scons-3.0.1.ebuild | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/dev-util/scons/scons-3.0.1.ebuild b/dev-util/scons/scons-3.0.1.ebuild index d511a65da38a..99e628bd1033 100644 --- a/dev-util/scons/scons-3.0.1.ebuild +++ b/dev-util/scons/scons-3.0.1.ebuild @@ -13,12 +13,21 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz doc? ( http://www.scons.org/doc/${PV}/PDF/${PN}-user.pdf -> ${P}-user.pdf http://www.scons.org/doc/${PV}/HTML/${PN}-user.html -> ${P}-user.html - )" + ) + test? ( https://github.com/scons/scons/archive/${PV}.tar.gz -> ${P}.gh.tar.gz )" LICENSE="MIT" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" -IUSE="doc" +IUSE="doc test" + +src_unpack() { + if use test; then + unpack "${P}.gh.tar.gz" + mv "${P}" "${P}-full" || die + fi + unpack "${P}.tar.gz" +} python_prepare_all() { # remove half-broken, useless custom commands @@ -29,6 +38,14 @@ python_prepare_all() { distutils-r1_python_prepare_all } +python_test() { + cd "${WORKDIR}/${P}-full" || die + "${EPYTHON}" runtest.py -as \ + -j "$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")" \ + --builddir "${BUILD_DIR}/lib" || + die "Tests fail with ${EPYTHON}" +} + python_install_all() { local DOCS=( {CHANGES,README,RELEASE}.txt ) distutils-r1_python_install_all |