From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 4N+pE6Ai32K4rQAAbAwnHQ (envelope-from ) for ; Tue, 26 Jul 2022 01:09:20 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id +M3bEqAi32LDcQEAG6o9tA (envelope-from ) for ; Tue, 26 Jul 2022 01:09:20 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 0743A2F2B5 for ; Tue, 26 Jul 2022 01:09:20 +0200 (CEST) Received: from localhost ([::1]:33152 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oG7CQ-0005YF-Sh for larch@yhetil.org; Mon, 25 Jul 2022 19:09:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36676) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oG7CB-0005Wm-6Y for guix-patches@gnu.org; Mon, 25 Jul 2022 19:09:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33681) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oG7CA-0005I1-UM for guix-patches@gnu.org; Mon, 25 Jul 2022 19:09:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oG7CA-0000AC-QH for guix-patches@gnu.org; Mon, 25 Jul 2022 19:09:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56771] [PATCH 03/33] gnu: qtbase: Enable test suite. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 25 Jul 2022 23:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56771 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56771@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 56771-submit@debbugs.gnu.org id=B56771.1658790507436 (code B ref 56771); Mon, 25 Jul 2022 23:09:02 +0000 Received: (at 56771) by debbugs.gnu.org; 25 Jul 2022 23:08:27 +0000 Received: from localhost ([127.0.0.1]:51620 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oG7BZ-00006j-IT for submit@debbugs.gnu.org; Mon, 25 Jul 2022 19:08:26 -0400 Received: from mail-qt1-f180.google.com ([209.85.160.180]:37826) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oG7BU-00005K-6z for 56771@debbugs.gnu.org; Mon, 25 Jul 2022 19:08:22 -0400 Received: by mail-qt1-f180.google.com with SMTP id l14so9388376qtv.4 for <56771@debbugs.gnu.org>; Mon, 25 Jul 2022 16:08:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ATb/G0c8HvMtGTUkv/1oasDq32I8G1RylJzky91vj/Q=; b=eGAZcPA7/AA30ih+6KsghhtSmYffQh16O3maT9rp6UYMojyhl3HSBIQW96tL1lnYor 8UydAG/eBqLDZHvRL/CU9c+M5F/DrvDCVQMkMaLk0Y+PW40x321K83U+1uJW3Kaj3J3R Idje5G9LkKgFA+WLydLpCaRT5++DTfQQSkozUGQzXWVrbdjl2KXqN8QzeTqAjaFWOM4M PseZM7xi4lmiQmU/vaTvGG/s/1LrVa+cIjYM55O9uXHleuVLUkaLWAZeD1JypP2xsvwi 3gXjLYy+C4JnmUvGNj6A4GSGVGMArn4tLboS1DsK93NdLq3JWiQBmEFBxda0SXgZ77fv klRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ATb/G0c8HvMtGTUkv/1oasDq32I8G1RylJzky91vj/Q=; b=4xEe7LPWoYuL1M0iNYPsHuiA2XuVIMCEVk297JhCmaaWDln4ZHwmzqSNXW/Yuu506F 8qaLJFi6gWp6hZMY/Dc5JPnmDDomCJG0+bU2Hs4knzqS5RzTO9w68IGmQns0CbeFwzeL 305vR12qjq7SPMVx0gTSeDDOzHczbh4XZ8s7yLHBr2+NCCyqrW+Tsv3/EA80e7wSKIeh 6PpUXifhfrPYfCVDQyNqUtfqDRBR5IvQddg44s7MDsGUPyHvEPfx7BBAl1YFvCrpO7kB FfWjLP6zAW6K2ke5FHScJV52EI73ngh1LA3clrDVMtIObn57FMGRPrUpAplaaehK4qMc nIiA== X-Gm-Message-State: AJIora9hHKKzw5w64UAeRZQaXo8pcfFQrkZdPnDwnf+9YTNvttazwe45 W95i1gZQ8Ursv+gW+Fc2s3u75gjeSiw= X-Google-Smtp-Source: AGRyM1sHpuwFNxV7MHlcat2u9cJ2lIvjGws+dz1LnOubdF7+j24Un7BrgY7l/NNgSDo3RXc+fmgIhA== X-Received: by 2002:a05:622a:14c8:b0:31f:bc3:fc0b with SMTP id u8-20020a05622a14c800b0031f0bc3fc0bmr12326703qtx.666.1658790494325; Mon, 25 Jul 2022 16:08:14 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-125-69.b2b2c.ca. [205.233.125.69]) by smtp.gmail.com with ESMTPSA id c15-20020ac8008f000000b0031ee9afafccsm8110580qtg.14.2022.07.25.16.08.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 16:08:13 -0700 (PDT) From: Maxim Cournoyer Date: Mon, 25 Jul 2022 19:07:33 -0400 Message-Id: <20220725230803.10002-3-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220725230803.10002-1-maxim.cournoyer@gmail.com> References: <20220725230803.10002-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1658790560; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=ATb/G0c8HvMtGTUkv/1oasDq32I8G1RylJzky91vj/Q=; b=QMMsqQdj4mlPuAYTm2UvO8nLsdaJacMQGuo3Ok+PVm8v7dTZ7b7/ffncNJRkYTkGcPvUC2 B29Z1Sfqbte+/CPADY/HIl94/2t+GzOV3t75GTs/7zebZnicoOVJFsTuIMi9iZ1sL/TbFZ 7C25y+J2iFYSo+pF+fe0Qxccn5iDclLuvCe2W14kHZQVDNl66UMiMMolCQURun7GwXkMmm ZWbRMFM6AOQE/HnX6B/pW3qttdZo37m4MROXXhFkYCPaOHQKRtj29d7G70iyNAjxvR+AzX +DWFiyMKk2vQW2MqK98zu5kzp81NQfnY8R+sI4YAJ4JQ81DGQUK0qoZj4aigyw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1658790560; a=rsa-sha256; cv=none; b=rlrMo0UPXrStTenhOY7PucRlUR7FmBNgzMLWZ5nYtNzqh/BU/ZmdxEDe4o7ozzjb0YCB4s KhTJwulfWTt30KYfY26xIBjttJ1vz9MwDNnSmlm1rAWjePzWQPcvYk9Tj6unDIZhydATmE 56rHrGhX10B/po62KUd4UugfYPOcJ7d+CznGq6yee1FdFyrIwn8uxJ0NlG0qy1NVzD4f7j 6w+0y0xfU5E1BKM7qjitCp4Sbhhc8SqhgApDesKGjFeZjm40lr8UGkA+lz54gAzMqnQsMD Kb42TWQ68RodSR1dKVlebfmAycYKz9QrCsiFMDoLno8isX+kveN2IcsMkwTFSA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=eGAZcPA7; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 6.67 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=eGAZcPA7; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 0743A2F2B5 X-Spam-Score: 6.67 X-Migadu-Scanner: scn1.migadu.com X-TUID: wiTgoNsehX79 * 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