diff options
-rw-r--r-- | dev-libs/unittest++/unittest++-1.6.0.ebuild | 14 |
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" +} |