gnu: jami: Work toward reinstating functional tests.
* gnu/packages/patches/jami-enable-testing.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/jami.scm (jami) [source]: Apply it. [phases] <check>: Use 'ctest' to run tests. Update comment explaining why the QML test suite is disabled. Change-Id: I5c9333a3b5064ecec9a2dd4fe13ae597d5354b7cmaster
parent
9ed847f828
commit
a05c130435
|
@ -1505,6 +1505,7 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/isl-0.11.1-aarch64-support.patch \
|
%D%/packages/patches/isl-0.11.1-aarch64-support.patch \
|
||||||
%D%/packages/patches/isync-openssl3-fix.patch \
|
%D%/packages/patches/isync-openssl3-fix.patch \
|
||||||
%D%/packages/patches/itk-snap-alt-glibc-compat.patch \
|
%D%/packages/patches/itk-snap-alt-glibc-compat.patch \
|
||||||
|
%D%/packages/patches/jami-enable-testing.patch \
|
||||||
%D%/packages/patches/jami-libjami-headers-search.patch \
|
%D%/packages/patches/jami-libjami-headers-search.patch \
|
||||||
%D%/packages/patches/jami-qwindowkit.patch \
|
%D%/packages/patches/jami-qwindowkit.patch \
|
||||||
%D%/packages/patches/jami-skip-tests-requiring-internet.patch \
|
%D%/packages/patches/jami-skip-tests-requiring-internet.patch \
|
||||||
|
|
|
@ -232,6 +232,7 @@ QSortFilterProxyModel conveniently exposed for QML.")
|
||||||
(base32
|
(base32
|
||||||
"1wqi50n80khyngj48brc8wg3m6jq471h9gm62yxpj4f8z5j81ncd"))
|
"1wqi50n80khyngj48brc8wg3m6jq471h9gm62yxpj4f8z5j81ncd"))
|
||||||
(patches (search-patches
|
(patches (search-patches
|
||||||
|
"jami-enable-testing.patch"
|
||||||
"jami-libjami-headers-search.patch"
|
"jami-libjami-headers-search.patch"
|
||||||
"jami-qwindowkit.patch"
|
"jami-qwindowkit.patch"
|
||||||
"jami-skip-tests-requiring-internet.patch"
|
"jami-skip-tests-requiring-internet.patch"
|
||||||
|
@ -276,22 +277,28 @@ QSortFilterProxyModel conveniently exposed for QML.")
|
||||||
;; https://git.jami.net/savoirfairelinux/jami-client-qt/-/issues/1504).
|
;; https://git.jami.net/savoirfairelinux/jami-client-qt/-/issues/1504).
|
||||||
(setenv "XDG_SESSION_TYPE" "x11")))
|
(setenv "XDG_SESSION_TYPE" "x11")))
|
||||||
(replace 'check
|
(replace 'check
|
||||||
(lambda* (#:key tests? #:allow-other-keys)
|
(lambda* (#:key tests? parallel-tests? #:allow-other-keys)
|
||||||
(when tests?
|
(when tests?
|
||||||
(setenv "QT_QPA_PLATFORM" "offscreen")
|
(setenv "QT_QPA_PLATFORM" "offscreen")
|
||||||
(setenv "QT_QUICK_BACKEND" "software")
|
(setenv "QT_QUICK_BACKEND" "software")
|
||||||
;; The tests require a writable HOME.
|
;; The tests require a writable HOME.
|
||||||
(setenv "HOME" "/tmp")
|
(setenv "HOME" "/tmp")
|
||||||
|
|
||||||
(display "Running unit tests...\n")
|
(let ((ctest-args
|
||||||
(invoke "tests/unit_tests")
|
(list "-V" "--output-on-failure"
|
||||||
|
"-j" (if parallel-tests?
|
||||||
|
(number->string (parallel-job-count))
|
||||||
|
"1"))))
|
||||||
|
|
||||||
;; The qml_tests suite is not run, as it currently exits with
|
(display "Running unit tests...\n")
|
||||||
;; an unclear status of 1 (see:
|
(apply invoke "ctest" "-R" "Unit_Tests" ctest-args)
|
||||||
;; https://git.jami.net/savoirfairelinux/jami-client-qt/-/issues/1605).
|
|
||||||
;; (display "Running functional tests...\n")
|
;; The QML test suite is currently disabled as it segfaults
|
||||||
;; (invoke "tests/qml_tests")
|
;; (see:
|
||||||
))))))
|
;; https://git.jami.net/savoirfairelinux/jami-client-qt/-/issues/1631).
|
||||||
|
;; (display "Running functional tests...\n") (apply invoke
|
||||||
|
;; "ctest" "-R" "Qml_Tests" ctest-args)
|
||||||
|
)))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list googletest
|
(list googletest
|
||||||
pkg-config
|
pkg-config
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
Fix an issue where ctest wouldn't find the qml test files.
|
||||||
|
Upstream status: forwarded to jami@gnu.org
|
||||||
|
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index e802357f..75cffda2 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -884,5 +884,6 @@ qt_finalize_executable(${PROJECT_NAME})
|
||||||
|
# tests
|
||||||
|
if(BUILD_TESTING)
|
||||||
|
message("Add Jami tests")
|
||||||
|
+ enable_testing()
|
||||||
|
add_subdirectory(${TESTS_DIR})
|
||||||
|
endif()
|
||||||
|
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
|
||||||
|
index 37796e52..06008ccf 100644
|
||||||
|
--- a/tests/CMakeLists.txt
|
||||||
|
+++ b/tests/CMakeLists.txt
|
||||||
|
@@ -1,6 +1,6 @@
|
||||||
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
|
||||||
|
-enable_testing(true)
|
||||||
|
+enable_testing()
|
||||||
|
|
||||||
|
set(QT_TESTING_MODULES
|
||||||
|
${QT_MODULES}
|
Reference in New Issue