From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 56771@debbugs.gnu.org
Cc: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Subject: [bug#56771] [PATCH 03/33] gnu: qtbase: Enable test suite.
Date: Mon, 25 Jul 2022 19:07:33 -0400 [thread overview]
Message-ID: <20220725230803.10002-3-maxim.cournoyer@gmail.com> (raw)
In-Reply-To: <20220725230803.10002-1-maxim.cournoyer@gmail.com>
* gnu/packages/qt.scm (qtbase)[tests?]: Delete argument.
[configure-flags]: Add "-DQT_BUILD_TESTS=ON".
[phases]{check}: Move after the patch-prl-files phase and override.
[native-inputs]: Add xvfb-run.
---
gnu/packages/qt.scm | 112 +++++++++++++++++++++++++++++++++++++++++---
1 file changed, 106 insertions(+), 6 deletions(-)
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index c2e509fcdf..001e6286fe 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -570,14 +570,10 @@ (define-public qtbase
(build-system cmake-build-system)
(arguments
(substitute-keyword-arguments (package-arguments qtbase-5)
- ;; XXX: There are many test failures, because the test suite
- ;; requires a real X server (a virtual one such as Xvfb is not
- ;; enough) or a functional network. It's also quite expensive to
- ;; build and run.
- ((#:tests? _ #f) #f)
((#:configure-flags _ ''())
`(let ((out (assoc-ref %outputs "out")))
(list "-GNinja" ;the build fails otherwise
+ "-DQT_BUILD_TESTS=ON"
(string-append "-DINSTALL_ARCHDATADIR=" out "/lib/qt6")
(string-append "-DINSTALL_DATADIR=" out "/share/qt6")
(string-append "-DINSTALL_DOCDIR=" out "/share/doc/qt6")
@@ -664,6 +660,108 @@ (define-public qtbase
(if parallel-build?
`("--parallel" ,(number->string (parallel-job-count)))
'()))))
+ (delete 'check) ;move after patch-prl-files
+ (add-after 'patch-prl-files 'check
+ (lambda* (#:key tests? parallel-tests? #:allow-other-keys)
+ (when tests?
+ ;; The tests expect to find the modules provided by this
+ ;; package; extend the environment variables needed to do so.
+ (setenv "CMAKE_PREFIX_PATH"
+ (string-append #$output
+ ":" (getenv "CMAKE_PREFIX_PATH")))
+ (setenv "QMAKEPATH" (string-append #$output "/lib/qt6"))
+ (setenv "QML2_IMPORT_PATH"
+ (string-append #$output "/lib/qt6/qml"))
+ (setenv "QT_PLUGIN_PATH"
+ (string-append #$output "/lib/qt6/plugins"))
+ (setenv "QT_QPA_PLATFORM" "offscreen")
+ ;; Skip tests known to fail on GNU/Linux, in a CI context or
+ ;; due to bitness (see: https://code.qt.io/cgit/qt/qtbase.git
+ ;; /tree/src/testlib/qtestblacklist.cpp).
+ (setenv "QTEST_ENVIRONMENT" "linux ci 32bit")
+ (setenv "HOME" "/tmp") ;some tests require a writable HOME
+ (invoke
+ "xvfb-run" "ctest" "--output-on-failure"
+ "-j" (if parallel-tests?
+ (number->string (parallel-job-count))
+ "1")
+ "-E" ;disable problematic tests
+ (string-append
+ "("
+ (string-join
+ (list
+ ;; The 'tst_moc' test fails with "'fi.exists()' returned FALSE".
+ "tst_moc"
+ ;; The 'test_rcc' test fails on a comparison:
+ ;; <<<<<< actual
+ ;; 0x0,0x0,0x0,0x0,0x0,0x0,0x3,0xe8,
+ ;; ======
+ ;; 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ ;; >>>>>> expected
+ "tst_rcc"
+ ;; The 'tst_qtemporarydir' and 'tst_qtemporaryfile'
+ ;; tests depend on '/home' not being writable.
+ "tst_qtemporarydir"
+ "tst_qtemporaryfile"
+ ;; The 'tst_qdir' compares two directories which are
+ ;; unexpectedly different when inside the build
+ ;; container.
+ "tst_qdir"
+ ;; This checks the last modified time of '/', and fails
+ ;; because Epoch 0 is considered to be invalid.
+ "tst_qresourceengine"
+ ;; The 'tst_qfilesystemwatcher' installs a watcher on
+ ;; '/home', which doesn't exist in the build container.
+ "tst_qfilesystemwatcher"
+ ;; The 'mockplugins' test fail following error: "Unknown
+ ;; platform linux-g++", and the other plugin tests
+ ;; depend on it.
+ "mockplugins"
+ "test_plugin_flavor.*"
+ ;; The 'test_import_plugins' fails with "Could NOT find
+ ;; Qt6MockPlugins1".
+ "test_import_plugins"
+ ;; The 'tst_QTimeZone::systemZone' validates the
+ ;; currently set timezone and fails.
+ "tst_qtimezone"
+ ;; The 'tst_qdatetime' fails with:
+ ;; FAIL! : tst_QDateTime::offsetFromUtc() Compared values are not the same
+ ;; Actual (dt5.offsetFromUtc()): 0
+ ;; Expected (46800) : 46800
+ "tst_qdatetime"
+ ;; The 'tst_QSettings::fromFile' assumes the data
+ ;; location to be relative to the root directory and
+ ;; fails.
+ "tst_qsettings"
+ ;; The 'tst_qaddpreroutine',
+ ;; 'test_generating_cpp_exports' and
+ ;; 'test_static_resources' tests fail with: "Unknown
+ ;; platform linux-g++.
+ "tst_qaddpreroutine"
+ "test_generating_cpp_exports"
+ "test_static_resources"
+ ;; The 'tst_qfile' fails since there is no /home in the
+ ;; build container.
+ "tst_qfile"
+ ;; The 'tst_QGlyphRun::mixedScripts' test fails with:
+ ;; Actual (glyphRuns.size()): 1
+ ;; Expected (2) : 2
+ "tst_qglyphrun"
+ ;; The 'tst_qx11info' test fails with "Internal error:
+ ;; QPA plugin doesn't implement generatePeekerId",
+ ;; likely requires a real display.
+ "tst_qx11info"
+ ;; The 'tst_qgraphicswidget' test fails because "This
+ ;; plugin does not support propagateSizeHints".
+ "tst_qgraphicswidget"
+ ;; The 'tst_qdnslookup' test requires networking.
+ "tst_qdnslookup"
+ ;; The 'tst_qcompleter' and 'tst_QFiledialog::completer'
+ ;; attempt to complete paths they assume exist, such as
+ ;; "/home", "/etc" or "/root" and fail.
+ "tst_qcompleter"
+ "tst_qfiledialog") "|")
+ ")")))))
(replace 'install
(lambda _
(invoke "cmake" "--install" ".")))
@@ -708,7 +806,9 @@ (define-public qtbase
(native-inputs
(modify-inputs (package-native-inputs qtbase-5)
(prepend gtk ;for GTK theme support
- ninja wayland-protocols)))
+ ninja
+ wayland-protocols
+ xvfb-run)))
(inputs
(modify-inputs (package-inputs qtbase-5)
(prepend bash-minimal coreutils-minimal libxcb md4c)
--
2.36.1
next prev parent reply other threads:[~2022-07-25 23:09 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-25 21:17 [bug#56771] [PATCH 00/33] *** Update Jami to 20220725, core Qt packages along the way Maxim Cournoyer
2022-07-25 23:07 ` [bug#56771] [PATCH 01/33] gnu: qtbase: Patch /bin/pwd in executable scripts Maxim Cournoyer
2022-07-25 23:07 ` [bug#56771] [PATCH 02/33] gnu: qtbase: Honor CMAKE_PREFIX_PATH Maxim Cournoyer
2022-07-25 23:07 ` Maxim Cournoyer [this message]
2022-07-25 23:07 ` [bug#56771] [PATCH 04/33] gnu: qtsvg: Rename variable to qtsvg-5 Maxim Cournoyer
2022-07-25 23:07 ` [bug#56771] [PATCH 05/33] gnu: qtsvg-5: Fix indentation Maxim Cournoyer
2022-07-25 23:07 ` [bug#56771] [PATCH 06/33] gnu: Add qtsvg, version 6.3.1 Maxim Cournoyer
2022-07-25 23:07 ` [bug#56771] [PATCH 07/33] gnu: qpwgraph: Migrate to Qt 6 and add libxkbcommon input Maxim Cournoyer
2022-07-25 23:07 ` [bug#56771] [PATCH 08/33] gnu: Add qtshadertools Maxim Cournoyer
2022-07-25 23:07 ` [bug#56771] [PATCH 09/33] gnu: qtmultimedia: Rename to qtmultimedia-5 Maxim Cournoyer
2022-07-25 23:07 ` [bug#56771] [PATCH 10/33] gnu: Add qtmultimedia, version 6.3.1 Maxim Cournoyer
2022-07-25 23:07 ` [bug#56771] [PATCH 11/33] gnu: qtdeclarative: Rename to qtdeclarative-5 Maxim Cournoyer
2022-07-25 23:07 ` [bug#56771] [PATCH 12/33] gnu: Add qtdeclarative, version 6.3.1 Maxim Cournoyer
2022-07-25 23:07 ` [bug#56771] [PATCH 13/33] gnu: qtquickcontrols: Rename to qtquickcontrols-5 Maxim Cournoyer
2022-07-25 23:07 ` [bug#56771] [PATCH 14/33] gnu: qtquickcontrols2: Rename to qtquickcontrols2-5 Maxim Cournoyer
2022-07-25 23:07 ` [bug#56771] [PATCH 15/33] gnu: qtquickcontrols2: Define as obsoleted by qtdeclarative Maxim Cournoyer
2022-07-25 23:07 ` [bug#56771] [PATCH 16/33] gnu: qtwebsockets: Rename to qtwebsockets-5 Maxim Cournoyer
2022-07-25 23:07 ` [bug#56771] [PATCH 17/33] gnu: Add qtwebsockets, version 6.3.1 Maxim Cournoyer
2022-07-25 23:07 ` [bug#56771] [PATCH 18/33] gnu: qtwebchannel: Rename to qtwebchannel-5 Maxim Cournoyer
2022-07-25 23:07 ` [bug#56771] [PATCH 19/33] gnu: Add qtwebchannel, version 6.3.1 Maxim Cournoyer
2022-07-25 23:07 ` [bug#56771] [PATCH 20/33] gnu: qtwebengine: Rename to qtwebengine-5 Maxim Cournoyer
2022-07-25 23:07 ` [bug#56771] [PATCH 21/33] gnu: Add qtwebengine, version 6.3.1 Maxim Cournoyer
2022-07-25 23:07 ` [bug#56771] [PATCH 22/33] gnu: Add qt5compat Maxim Cournoyer
2022-07-25 23:07 ` [bug#56771] [PATCH 23/33] gnu: qttools: Rename to qttools-5 Maxim Cournoyer
2022-07-25 23:07 ` [bug#56771] [PATCH 24/33] gnu: Add qttools, version 6.3.1 Maxim Cournoyer
2022-07-25 23:07 ` [bug#56771] [PATCH 25/33] gnu: qtnetworkauth: Rename to qtnetworkauth-5 Maxim Cournoyer
2022-07-25 23:07 ` [bug#56771] [PATCH 26/33] gnu: Add qtnetworkauth, version 6.3.1 Maxim Cournoyer
2022-07-25 23:07 ` [bug#56771] [PATCH 27/33] gnu: Add qtpositioning Maxim Cournoyer
2022-07-25 23:07 ` [bug#56771] [PATCH 28/33] build: qt: Add qtbase argument and wrap Qt environment variables exactly Maxim Cournoyer
2022-07-25 23:07 ` [bug#56771] [PATCH 29/33] gnu: jami: Update to 20220725.1128.fd5e6c6 Maxim Cournoyer
2022-07-25 23:08 ` [bug#56771] [PATCH 30/33] gnu: libjami: Enable test agent Maxim Cournoyer
2022-07-25 23:08 ` [bug#56771] [PATCH 31/33] gnu: Remove jami-libclient Maxim Cournoyer
2022-07-25 23:08 ` [bug#56771] [PATCH 32/33] gnu: Deprecate jami-gnome for jami Maxim Cournoyer
2022-07-25 23:08 ` [bug#56771] [PATCH 33/33] gnu: jami: Update to 20220725.1128.fd5e6c6 Maxim Cournoyer
2022-07-26 16:14 ` [bug#56771] [PATCH 00/33] *** Update Jami to 20220725, core Qt packages along the way Jack Hill
2022-07-27 5:28 ` Jack Hill
2022-08-01 4:22 ` bug#56771: " Maxim Cournoyer
2022-08-01 4:39 ` [bug#56771] " Jack Hill
2022-08-01 10:54 ` Maxime Devos
2022-08-01 15:39 ` Maxim Cournoyer
2022-08-01 22:00 ` Maxime Devos
2022-08-05 12:51 ` Maxime Devos
2022-08-06 4:56 ` Maxim Cournoyer
2022-08-06 19:15 ` Maxime Devos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220725230803.10002-3-maxim.cournoyer@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=56771@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.