summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Sautier <sautier.louis@gmail.com>2016-03-15 17:33:43 +0100
committerMichael Palimaka <kensington@gentoo.org>2016-03-16 03:46:52 +1100
commitaa20461166bae303d9a497200183d0014713f897 (patch)
treecea6e13444aa803f63511bf0186e85fd21fbc011 /dev-libs
parentnet-libs/libssh: x86 stable wrt bug #575484 (diff)
downloadgentoo-aa20461166bae303d9a497200183d0014713f897.tar.gz
gentoo-aa20461166bae303d9a497200183d0014713f897.tar.bz2
gentoo-aa20461166bae303d9a497200183d0014713f897.zip
dev-libs/unittest++: make tests optional
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=576806 Package-Manager: portage-2.2.27
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/unittest++/unittest++-1.6.0.ebuild14
1 files changed, 14 insertions, 0 deletions
diff --git a/dev-libs/unittest++/unittest++-1.6.0.ebuild b/dev-libs/unittest++/unittest++-1.6.0.ebuild
index a9fd32d460f4..88dc9395ffed 100644
--- a/dev-libs/unittest++/unittest++-1.6.0.ebuild
+++ b/dev-libs/unittest++/unittest++-1.6.0.ebuild
@@ -16,5 +16,19 @@ SRC_URI="https://github.com/${MY_PN}/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
+IUSE="test"
S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ sed -i '/run unit tests as post build step/,/Running unit tests/d' \
+ CMakeLists.txt || die
+ use test || sed -i \
+ '/build the test runner/,/target_link_libraries(TestUnitTest++ UnitTest++/d' \
+ CMakeLists.txt || die
+ cmake-utils_src_prepare
+}
+
+src_test() {
+ "${BUILD_DIR}/TestUnitTest++" || die "Tests failed"
+}