summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2021-04-21 21:00:41 -0700
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2021-04-21 21:04:51 -0700
commitd4e19111c464077a4675cb90ae46928778675431 (patch)
tree9028e9dc3d0855e8db5f6e429c9859e911aba74d /dev-util/bear
parentdev-util/bear: add 3.0.10 (diff)
downloadgentoo-d4e19111c464077a4675cb90ae46928778675431.tar.gz
gentoo-d4e19111c464077a4675cb90ae46928778675431.tar.bz2
gentoo-d4e19111c464077a4675cb90ae46928778675431.zip
dev-util/bear: QA fix questionable test phase via cmake abuse
Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'dev-util/bear')
-rw-r--r--dev-util/bear/bear-3.0.10.ebuild28
1 files changed, 16 insertions, 12 deletions
diff --git a/dev-util/bear/bear-3.0.10.ebuild b/dev-util/bear/bear-3.0.10.ebuild
index 863e0ddc519b..7e4916e9e4cf 100644
--- a/dev-util/bear/bear-3.0.10.ebuild
+++ b/dev-util/bear/bear-3.0.10.ebuild
@@ -25,9 +25,10 @@ RDEPEND="
"
DEPEND="${RDEPEND}
-test? (
- >=dev-cpp/gtest-1.10
-)"
+ test? (
+ >=dev-cpp/gtest-1.10
+ )
+"
BDEPEND="test? (
$(python_gen_any_dep '
@@ -43,10 +44,16 @@ pkg_setup() {
use test && python-any-r1_pkg_setup
}
+src_prepare() {
+ cmake_src_prepare
+ # Turn off testing before installation
+ sed -i 's/TEST_BEFORE_INSTALL/TEST_EXCLUDE_FROM_MAIN/g' CMakeLists.txt || die
+}
+
src_configure() {
local mycmakeargs=(
- "-DENABLE_UNIT_TESTS=OFF"
- "-DENABLE_FUNC_TESTS=OFF"
+ -DENABLE_UNIT_TESTS="$(usex test ON OFF)"
+ -DENABLE_FUNC_TESTS="$(usex test ON OFF)"
)
cmake_src_configure
}
@@ -71,12 +78,9 @@ src_test() {
ewarn "Skipping tests"
else
einfo "test may use optional tools if found: qmake gfortran valgrind"
- local mycmakeargs=(
- "-DENABLE_UNIT_TESTS=ON"
- "-DENABLE_FUNC_TESTS=ON"
- )
- # bear has no seperate "make check"
- cmake_src_configure
- cmake_build all
+ # unit tests
+ cmake_run_in "${BUILD_DIR}/subprojects/Build/BearSource" ctest --verbose
+ # functional tests
+ cmake_run_in "${BUILD_DIR}/subprojects/Build/BearTest" ctest --verbose
fi
}