summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2023-08-21 08:36:05 -0400
committerIonen Wolkens <ionen@gentoo.org>2023-09-05 09:01:03 -0400
commit424c9f5509023644cc713412233d8fcd7a614e50 (patch)
treea85208fb3925fbd3ffacf193affb14458dae9aff /dev-qt/qtwebengine
parentdev-qt/qtdeclarative: restrict tests (qt6) (diff)
downloadgentoo-424c9f5509023644cc713412233d8fcd7a614e50.tar.gz
gentoo-424c9f5509023644cc713412233d8fcd7a614e50.tar.bz2
gentoo-424c9f5509023644cc713412233d8fcd7a614e50.zip
dev-qt/qtwebengine: various adjustments for tests (qt6)
* use -j1 (similarly to when I tried to use python-xdist on qutebrowser which uses qtwebengine, parallel tests don't seem to work so well here either) * skip tests that need network * skip cert test, not looked too closely but likely missing something or (maybe) expirations are causing issues * export various variables to stop it from using the system's qtwebengine (otherwise fails if not installed) Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'dev-qt/qtwebengine')
-rw-r--r--dev-qt/qtwebengine/qtwebengine-6.5.2.ebuild28
-rw-r--r--dev-qt/qtwebengine/qtwebengine-6.5.9999.ebuild28
-rw-r--r--dev-qt/qtwebengine/qtwebengine-6.9999.ebuild28
3 files changed, 84 insertions, 0 deletions
diff --git a/dev-qt/qtwebengine/qtwebengine-6.5.2.ebuild b/dev-qt/qtwebengine/qtwebengine-6.5.2.ebuild
index db3e7be77375..512c148fc7e0 100644
--- a/dev-qt/qtwebengine/qtwebengine-6.5.2.ebuild
+++ b/dev-qt/qtwebengine/qtwebengine-6.5.2.ebuild
@@ -247,3 +247,31 @@ src_configure() {
qt6-build_src_configure
}
+
+src_test() {
+ if [[ ${EUID} == 0 ]]; then
+ # almost every tests fail, so skip entirely
+ ewarn "Skipping tests due to running as root (chromium refuses this configuration)."
+ return
+ fi
+
+ local CMAKE_SKIP_TESTS=(
+ # fails with network sandbox
+ tst_loadsignals
+ tst_qquickwebengineview
+ tst_qwebengineview
+ # certs verfication seems flaky and gives expiration warnings
+ tst_qwebengineclientcertificatestore
+ )
+
+ # prevent using the system's qtwebengine
+ # (use glob to avoid unnecessary complications with arch dir)
+ local resources=( "${BUILD_DIR}/src/core/${CMAKE_BUILD_TYPE}/"* )
+ [[ -d ${resources[0]} ]] || die "invalid resources path: ${resources[0]}"
+ local -x QTWEBENGINEPROCESS_PATH=${BUILD_DIR}${QT6_LIBEXECDIR#"${QT6_PREFIX}"}/QtWebEngineProcess
+ local -x QTWEBENGINE_LOCALES_PATH=${resources[0]}/qtwebengine_locales
+ local -x QTWEBENGINE_RESOURCES_PATH=${resources[0]}
+
+ # random failures in several tests without -j1
+ qt6-build_src_test -j1
+}
diff --git a/dev-qt/qtwebengine/qtwebengine-6.5.9999.ebuild b/dev-qt/qtwebengine/qtwebengine-6.5.9999.ebuild
index e99b4903d045..3a82bdc90577 100644
--- a/dev-qt/qtwebengine/qtwebengine-6.5.9999.ebuild
+++ b/dev-qt/qtwebengine/qtwebengine-6.5.9999.ebuild
@@ -243,3 +243,31 @@ src_configure() {
qt6-build_src_configure
}
+
+src_test() {
+ if [[ ${EUID} == 0 ]]; then
+ # almost every tests fail, so skip entirely
+ ewarn "Skipping tests due to running as root (chromium refuses this configuration)."
+ return
+ fi
+
+ local CMAKE_SKIP_TESTS=(
+ # fails with network sandbox
+ tst_loadsignals
+ tst_qquickwebengineview
+ tst_qwebengineview
+ # certs verfication seems flaky and gives expiration warnings
+ tst_qwebengineclientcertificatestore
+ )
+
+ # prevent using the system's qtwebengine
+ # (use glob to avoid unnecessary complications with arch dir)
+ local resources=( "${BUILD_DIR}/src/core/${CMAKE_BUILD_TYPE}/"* )
+ [[ -d ${resources[0]} ]] || die "invalid resources path: ${resources[0]}"
+ local -x QTWEBENGINEPROCESS_PATH=${BUILD_DIR}${QT6_LIBEXECDIR#"${QT6_PREFIX}"}/QtWebEngineProcess
+ local -x QTWEBENGINE_LOCALES_PATH=${resources[0]}/qtwebengine_locales
+ local -x QTWEBENGINE_RESOURCES_PATH=${resources[0]}
+
+ # random failures in several tests without -j1
+ qt6-build_src_test -j1
+}
diff --git a/dev-qt/qtwebengine/qtwebengine-6.9999.ebuild b/dev-qt/qtwebengine/qtwebengine-6.9999.ebuild
index c7527f95be63..31ce642b8e27 100644
--- a/dev-qt/qtwebengine/qtwebengine-6.9999.ebuild
+++ b/dev-qt/qtwebengine/qtwebengine-6.9999.ebuild
@@ -243,3 +243,31 @@ src_configure() {
qt6-build_src_configure
}
+
+src_test() {
+ if [[ ${EUID} == 0 ]]; then
+ # almost every tests fail, so skip entirely
+ ewarn "Skipping tests due to running as root (chromium refuses this configuration)."
+ return
+ fi
+
+ local CMAKE_SKIP_TESTS=(
+ # fails with network sandbox
+ tst_loadsignals
+ tst_qquickwebengineview
+ tst_qwebengineview
+ # certs verfication seems flaky and gives expiration warnings
+ tst_qwebengineclientcertificatestore
+ )
+
+ # prevent using the system's qtwebengine
+ # (use glob to avoid unnecessary complications with arch dir)
+ local resources=( "${BUILD_DIR}/src/core/${CMAKE_BUILD_TYPE}/"* )
+ [[ -d ${resources[0]} ]] || die "invalid resources path: ${resources[0]}"
+ local -x QTWEBENGINEPROCESS_PATH=${BUILD_DIR}${QT6_LIBEXECDIR#"${QT6_PREFIX}"}/QtWebEngineProcess
+ local -x QTWEBENGINE_LOCALES_PATH=${resources[0]}/qtwebengine_locales
+ local -x QTWEBENGINE_RESOURCES_PATH=${resources[0]}
+
+ # random failures in several tests without -j1
+ qt6-build_src_test -j1
+}