From patchwork Thu Jul 25 20:40:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?S=C3=B6ren_Tempel?= X-Patchwork-Id: 29534 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id EF87B27BBE9; Thu, 25 Jul 2024 21:41:17 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A895D27BBE2 for ; Thu, 25 Jul 2024 21:41:17 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sX5Gi-0003kJ-DB; Thu, 25 Jul 2024 16:40:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sX5Gg-0003jp-PQ for guix-patches@gnu.org; Thu, 25 Jul 2024 16:40:55 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sX5Gg-0007wB-Ha for guix-patches@gnu.org; Thu, 25 Jul 2024 16:40:54 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sX5Go-0001RX-4z for guix-patches@gnu.org; Thu, 25 Jul 2024 16:41:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72106] [PATCH v3 2/5] gnu: klee: Enable the test suite. Resent-From: soeren@soeren-tempel.net Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 25 Jul 2024 20:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72106 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 72106@debbugs.gnu.org Cc: ludo@gnu.org, liliana.prikler@gmail.com Received: via spool by 72106-submit@debbugs.gnu.org id=B72106.17219400325456 (code B ref 72106); Thu, 25 Jul 2024 20:41:02 +0000 Received: (at 72106) by debbugs.gnu.org; 25 Jul 2024 20:40:32 +0000 Received: from localhost ([127.0.0.1]:37869 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sX5GK-0001Pw-DT for submit@debbugs.gnu.org; Thu, 25 Jul 2024 16:40:32 -0400 Received: from magnesium.8pit.net ([45.76.88.171]:27883) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sX5GG-0001PT-PI; Thu, 25 Jul 2024 16:40:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=opensmtpd; bh=ghaH4brx H0gD+106AK1DCiXvNpAN26VmT7pIwtH9ARs=; h=references:in-reply-to:date: subject:cc:to:from; d=soeren-tempel.net; b=pWzw+pi6S9RI1ZqM1eCB1ep+uGd F4GvWx5YeQCmk8sRcS5Mt6oc7z5H+15ViMqaXwkefGtwJG0CoCVESs5DawyxGTxAMBaOSr bW+HQpanFYzPZif9unjLzW/h91KSFfXSXB6HtAxJDZjHKmj94y6nUgJlDCAaP+fP9q9lJ9 1+P8= Received: from localhost (dynamic-176-005-150-084.176.5.pool.telefonica.de [176.5.150.84]) by magnesium.8pit.net (OpenSMTPD) with ESMTPSA id 77438f42 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:YES); Thu, 25 Jul 2024 22:40:19 +0200 (CEST) From: soeren@soeren-tempel.net Date: Thu, 25 Jul 2024 22:40:00 +0200 Message-ID: <879a9aeca685352ce048738e127b8ab3cbb58460.1721940003.git.soeren@soeren-tempel.net> X-Mailer: git-send-email 2.45.2 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: Sören Tempel * gnu/packages/check.scm (klee): Enable all tests. [arguments]: Add phase to patch lit configuration, set #:test-target. <#:configure-flags?>: Enable system and unit tests, configure gtest. [inputs]: Add googletest and python-lit. --- gnu/packages/check.scm | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 3c5ed7a3c3..48e8ae3aef 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -1063,13 +1063,23 @@ (define-public klee (base32 "1nma6dqi8chjb97llsa8mzyskgsg4dx56lm8j514j5wmr8vkafz6")))) (arguments (list + #:test-target "check" #:phases #~(modify-phases %standard-phases - (add-after 'unpack 'patch + (add-after 'unpack 'patch-cmake (lambda _ (substitute* "CMakeLists.txt" (("\\$\\{KLEE_UCLIBC_PATH\\}/lib/libc\\.a") "${KLEE_UCLIBC_PATH}")))) + (add-after 'unpack 'patch-lit-config + (lambda _ + ;; Make sure that we retain the value of the GUIX_PYTHONPATH + ;; environment variable in the test environmented created by + ;; python-lit. Otherwise, the test scripts won't be able to + ;; find the python-tabulate dependency, causing test failures. + (substitute* "test/lit.cfg" + (("addEnv\\('PWD'\\)" env) + (string-append env "\n" "addEnv('GUIX_PYTHONPATH')"))))) (add-after 'install 'wrap-klee-stats (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -1088,7 +1098,13 @@ (define-public klee `("KLEE_RUNTIME_LIBRARY_PATH" = (,(string-append lib "/klee/runtime/")))))))) #:configure-flags - #~(list (string-append "-DLLVMCC=" + #~(list "-DENABLE_UNIT_TESTS=ON" + "-DENABLE_SYSTEM_TESTS=ON" + (string-append "-DGTEST_SRC_DIR=" + #+(package-source googletest)) + (string-append "-DGTEST_INCLUDE_DIR=" + #+(package-source googletest) "/googletest/include") + (string-append "-DLLVMCC=" (search-input-file %build-inputs "/bin/clang")) (string-append "-DLLVMCXX=" (search-input-file %build-inputs "/bin/clang++"))