From unknown Fri Sep 19 23:03:26 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#77750] [PATCH] gnu: cppcheck: Update to 2.17.1 Resent-From: Florent Pruvost Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 11 Apr 2025 17:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 77750 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77750@debbugs.gnu.org Cc: Florent Pruvost X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.174439215315205 (code B ref -1); Fri, 11 Apr 2025 17:23:01 +0000 Received: (at submit) by debbugs.gnu.org; 11 Apr 2025 17:22:33 +0000 Received: from localhost ([127.0.0.1]:51638 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u3I5H-0003x8-Ni for submit@debbugs.gnu.org; Fri, 11 Apr 2025 13:22:32 -0400 Received: from lists.gnu.org ([2001:470:142::17]:55170) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u3Eeu-0006l2-LL for submit@debbugs.gnu.org; Fri, 11 Apr 2025 09:43:05 -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 1u3Eem-0003PL-BQ for guix-patches@gnu.org; Fri, 11 Apr 2025 09:42:56 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u3Eei-0002Ed-Je for guix-patches@gnu.org; Fri, 11 Apr 2025 09:42:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=wqU2t6+24LzPdrqupRlLwylGX6GYCjAAQcgswXohvNU=; b=K7Yy1cpZvZ2HT66gPfEzcF/07FsNanXMSGym7W9h/0Ajcl79iAvsKmnk SwXsR8cRKSgp36wzXTkV2xWo5cZGid+vPlzewCR4rqdwELFWcAly9b4EU KmaboVt5QHOc/1u1zFafIqfvkxog+6uWieM2sM0Sh1Xx5kPTG2PpwpOYb 8=; Authentication-Results: mail2-relais-roc.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=florent.pruvost@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="6.15,205,1739833200"; d="scan'208";a="217495795" Received: from unknown (HELO esthar.bordeaux.inria.fr) ([193.50.110.177]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Apr 2025 15:42:48 +0200 From: Florent Pruvost Date: Fri, 11 Apr 2025 15:42:38 +0200 Message-ID: <20250411134238.320182-1-florent.pruvost@inria.fr> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=192.134.164.83; envelope-from=florent.pruvost@inria.fr; helo=mail2-relais-roc.national.inria.fr X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.0 (/) X-Mailman-Approved-At: Fri, 11 Apr 2025 13:22:30 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/check.scm (cppcheck): Update to 2.17.1. [source]: Update hash. [arguments]: Add patch to fix basedir in test. [patches]: Remove cppcheck-disable-char-signedness-test.patch. [patches]: Add cppcheck-fix-basedir-test.patch. Change-Id: Iebd33e2966ef30a3cd5b7b157f1051fcacbe1884 --- gnu/local.mk | 2 +- gnu/packages/check.scm | 6 ++-- ...ppcheck-disable-char-signedness-test.patch | 27 -------------- .../patches/cppcheck-fix-basedir-test.patch | 36 +++++++++++++++++++ 4 files changed, 40 insertions(+), 31 deletions(-) delete mode 100644 gnu/packages/patches/cppcheck-disable-char-signedness-test.patch create mode 100644 gnu/packages/patches/cppcheck-fix-basedir-test.patch diff --git a/gnu/local.mk b/gnu/local.mk index 29bf4c72b8..83bb56f304 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1145,7 +1145,7 @@ dist_patch_DATA = \ %D%/packages/patches/corefx-mono-5.4.0-patches.patch \ %D%/packages/patches/corefx-mono-pre-5.8.0-patches.patch \ %D%/packages/patches/coreutils-gnulib-tests.patch \ - %D%/packages/patches/cppcheck-disable-char-signedness-test.patch \ + %D%/packages/patches/cppcheck-fix-basedir-test.patch \ %D%/packages/patches/cppdap-add-CPPDAP_USE_EXTERNAL_GTEST_PACKAGE.patch\ %D%/packages/patches/cpulimit-with-glib-2.32.patch \ %D%/packages/patches/crawl-upgrade-saves.patch \ diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 8193dd785f..db820766eb 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -791,7 +791,7 @@ (define-public cmocka (define-public cppcheck (package (name "cppcheck") - (version "2.10.3") + (version "2.17.1") (source (origin (method git-fetch) (uri (git-reference @@ -799,8 +799,8 @@ (define-public cppcheck (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "1xfxcg00rxjrb9m2k78yd3jjlldkciv67fsbmjb6n3l43hgfxb9k")) - (patches (search-patches "cppcheck-disable-char-signedness-test.patch")))) + (base32 "19ap9ai9s4vsygyqfa215mrmpz4vki63d5b4qdb89zvbldaf3hlf")) + (patches (search-patches "cppcheck-fix-basedir-test.patch")))) (build-system cmake-build-system) (arguments '(#:configure-flags '("-DBUILD_TESTS=ON"))) diff --git a/gnu/packages/patches/cppcheck-disable-char-signedness-test.patch b/gnu/packages/patches/cppcheck-disable-char-signedness-test.patch deleted file mode 100644 index d39d300f84..0000000000 --- a/gnu/packages/patches/cppcheck-disable-char-signedness-test.patch +++ /dev/null @@ -1,27 +0,0 @@ -https://sources.debian.org/data/main/c/cppcheck/2.10-2/debian/patches/disable-some-tests-about-char-signedness -https://trac.cppcheck.net/ticket/11537 - -Description: Disable some tests affected by char signedness. -Author: Joachim Reichel -Bug: https://trac.cppcheck.net/ticket/11537 - -Index: cppcheck/test/testcondition.cpp -=================================================================== ---- cppcheck.orig/test/testcondition.cpp -+++ cppcheck/test/testcondition.cpp -@@ -4939,6 +4939,7 @@ private: - "}\n"); - ASSERT_EQUALS("[test.cpp:4]: (style) Condition 'it!=vector.end()' is always true\n", errout.str()); - -+#if 0 - // #11303 - check("void f(int n) {\n" - " std::vector buffer(n);\n" -@@ -4947,6 +4948,7 @@ private: - " buffer.back() == '\\0') {}\n" - "}\n"); - ASSERT_EQUALS("[test.cpp:5]: (style) Condition 'buffer.back()=='\\0'' is always false\n", errout.str()); -+#endif - - // #9353 - check("typedef struct { std::string s; } X;\n" diff --git a/gnu/packages/patches/cppcheck-fix-basedir-test.patch b/gnu/packages/patches/cppcheck-fix-basedir-test.patch new file mode 100644 index 0000000000..06a1422629 --- /dev/null +++ b/gnu/packages/patches/cppcheck-fix-basedir-test.patch @@ -0,0 +1,36 @@ +Fix the test "TestFileLister" by giving precisely the source directory instead of guessing it. +Author: Florent Pruvost + +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index 467e6e95e..d68d83e3d 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -85,6 +85,7 @@ if (BUILD_TESTS) + elseif(TEST ${NAME}) + else() + add_test(NAME ${NAME} COMMAND $ ${NAME} WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) ++ set_tests_properties(${NAME} PROPERTIES ENVIRONMENT "PROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR}") + endif() + endfunction() + +diff --git a/test/testfilelister.cpp b/test/testfilelister.cpp +index 3e2f56dfc..ecf0f9c6e 100644 +--- a/test/testfilelister.cpp ++++ b/test/testfilelister.cpp +@@ -45,15 +45,7 @@ private: + + // TODO: generate file list instead + static std::string findBaseDir() { +- std::string basedir; +- while (!Path::isDirectory(Path::join(basedir, ".github"))) { +- const std::string abspath = Path::getAbsoluteFilePath(basedir); +- basedir += "../"; +- // no more going up +- if (Path::getAbsoluteFilePath(basedir) == abspath) +- throw std::runtime_error("could not find repository root directory"); +- } +- return basedir; ++ return Path::getAbsoluteFilePath(std::getenv("PROJECT_SOURCE_DIR")) + "/"; + } + + void recursiveAddFiles() const { base-commit: 6036f1f3053bc9b4f0411b5e8aeaab5bd7f4ec7b -- 2.43.0 From unknown Fri Sep 19 23:03:26 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Florent Pruvost Subject: bug#77750: closed (Re: [bug#77750] [PATCH] gnu: cppcheck: Update to 2.17.1) Message-ID: References: <87jz7llvhj.fsf@gnu.org> <20250411134238.320182-1-florent.pruvost@inria.fr> X-Gnu-PR-Message: they-closed 77750 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 77750@debbugs.gnu.org Date: Tue, 15 Apr 2025 07:45:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1744703102-20030-1" This is a multi-part message in MIME format... ------------=_1744703102-20030-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #77750: [PATCH] gnu: cppcheck: Update to 2.17.1 which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 77750@debbugs.gnu.org. --=20 77750: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D77750 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1744703102-20030-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 77750-done) by debbugs.gnu.org; 15 Apr 2025 07:44:35 +0000 Received: from localhost ([127.0.0.1]:50378 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u4ayB-0005C1-0g for submit@debbugs.gnu.org; Tue, 15 Apr 2025 03:44:35 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:54167) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u4ay7-0005Bh-Ur for 77750-done@debbugs.gnu.org; Tue, 15 Apr 2025 03:44:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version:content-transfer-encoding; bh=cGxd4Hk8J+7o67fugDCvJhPrdR4LC9nh0+fzk0yewKA=; b=CdKGYridxj5wnT2Usb4HyTRogdQkfIfniRC46TDbcKvIHuFfXP59GgQS YSDpDsGlk9RSkS/fEo8byqAWJybt+GNIBtvQ2R4KdvT6Df+qItFIQ4Mt9 i9gUc346Lgg1dnv2oj8ygVxBJVhZvq29MYyVEKU7mDlD2OJhBsjh1LafD k=; Authentication-Results: mail2-relais-roc.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=ludovic.courtes@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="6.15,213,1739833200"; d="scan'208";a="217889743" Received: from unknown (HELO ribbon) ([193.50.110.57]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Apr 2025 09:44:25 +0200 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Florent Pruvost Subject: Re: [bug#77750] [PATCH] gnu: cppcheck: Update to 2.17.1 In-Reply-To: <20250411134238.320182-1-florent.pruvost@inria.fr> (Florent Pruvost's message of "Fri, 11 Apr 2025 15:42:38 +0200") References: <20250411134238.320182-1-florent.pruvost@inria.fr> Date: Tue, 15 Apr 2025 09:44:24 +0200 Message-ID: <87jz7llvhj.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 77750-done Cc: 77750-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello! Florent Pruvost writes: > * gnu/packages/check.scm (cppcheck): Update to 2.17.1. > [source]: Update hash. > [arguments]: Add patch to fix basedir in test. > [patches]: Remove cppcheck-disable-char-signedness-test.patch. > [patches]: Add cppcheck-fix-basedir-test.patch. > > Change-Id: Iebd33e2966ef30a3cd5b7b157f1051fcacbe1884 Pushed with a slightly modified commit log. While running =E2=80=98guix build -P1 cppcheck=E2=80=99, I noticed that mic= roscheme would fail to build, so I added a commit removing cppcheck from its inputs (it=E2=80=99s not necessary, just a developer helper). Thanks! :-) Ludo=E2=80=99. ------------=_1744703102-20030-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 11 Apr 2025 17:22:33 +0000 Received: from localhost ([127.0.0.1]:51638 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u3I5H-0003x8-Ni for submit@debbugs.gnu.org; Fri, 11 Apr 2025 13:22:32 -0400 Received: from lists.gnu.org ([2001:470:142::17]:55170) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u3Eeu-0006l2-LL for submit@debbugs.gnu.org; Fri, 11 Apr 2025 09:43:05 -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 1u3Eem-0003PL-BQ for guix-patches@gnu.org; Fri, 11 Apr 2025 09:42:56 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u3Eei-0002Ed-Je for guix-patches@gnu.org; Fri, 11 Apr 2025 09:42:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=wqU2t6+24LzPdrqupRlLwylGX6GYCjAAQcgswXohvNU=; b=K7Yy1cpZvZ2HT66gPfEzcF/07FsNanXMSGym7W9h/0Ajcl79iAvsKmnk SwXsR8cRKSgp36wzXTkV2xWo5cZGid+vPlzewCR4rqdwELFWcAly9b4EU KmaboVt5QHOc/1u1zFafIqfvkxog+6uWieM2sM0Sh1Xx5kPTG2PpwpOYb 8=; Authentication-Results: mail2-relais-roc.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=florent.pruvost@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="6.15,205,1739833200"; d="scan'208";a="217495795" Received: from unknown (HELO esthar.bordeaux.inria.fr) ([193.50.110.177]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Apr 2025 15:42:48 +0200 From: Florent Pruvost To: guix-patches@gnu.org Subject: [PATCH] gnu: cppcheck: Update to 2.17.1 Date: Fri, 11 Apr 2025 15:42:38 +0200 Message-ID: <20250411134238.320182-1-florent.pruvost@inria.fr> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=192.134.164.83; envelope-from=florent.pruvost@inria.fr; helo=mail2-relais-roc.national.inria.fr X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 11 Apr 2025 13:22:30 -0400 Cc: Florent Pruvost X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/check.scm (cppcheck): Update to 2.17.1. [source]: Update hash. [arguments]: Add patch to fix basedir in test. [patches]: Remove cppcheck-disable-char-signedness-test.patch. [patches]: Add cppcheck-fix-basedir-test.patch. Change-Id: Iebd33e2966ef30a3cd5b7b157f1051fcacbe1884 --- gnu/local.mk | 2 +- gnu/packages/check.scm | 6 ++-- ...ppcheck-disable-char-signedness-test.patch | 27 -------------- .../patches/cppcheck-fix-basedir-test.patch | 36 +++++++++++++++++++ 4 files changed, 40 insertions(+), 31 deletions(-) delete mode 100644 gnu/packages/patches/cppcheck-disable-char-signedness-test.patch create mode 100644 gnu/packages/patches/cppcheck-fix-basedir-test.patch diff --git a/gnu/local.mk b/gnu/local.mk index 29bf4c72b8..83bb56f304 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1145,7 +1145,7 @@ dist_patch_DATA = \ %D%/packages/patches/corefx-mono-5.4.0-patches.patch \ %D%/packages/patches/corefx-mono-pre-5.8.0-patches.patch \ %D%/packages/patches/coreutils-gnulib-tests.patch \ - %D%/packages/patches/cppcheck-disable-char-signedness-test.patch \ + %D%/packages/patches/cppcheck-fix-basedir-test.patch \ %D%/packages/patches/cppdap-add-CPPDAP_USE_EXTERNAL_GTEST_PACKAGE.patch\ %D%/packages/patches/cpulimit-with-glib-2.32.patch \ %D%/packages/patches/crawl-upgrade-saves.patch \ diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 8193dd785f..db820766eb 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -791,7 +791,7 @@ (define-public cmocka (define-public cppcheck (package (name "cppcheck") - (version "2.10.3") + (version "2.17.1") (source (origin (method git-fetch) (uri (git-reference @@ -799,8 +799,8 @@ (define-public cppcheck (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "1xfxcg00rxjrb9m2k78yd3jjlldkciv67fsbmjb6n3l43hgfxb9k")) - (patches (search-patches "cppcheck-disable-char-signedness-test.patch")))) + (base32 "19ap9ai9s4vsygyqfa215mrmpz4vki63d5b4qdb89zvbldaf3hlf")) + (patches (search-patches "cppcheck-fix-basedir-test.patch")))) (build-system cmake-build-system) (arguments '(#:configure-flags '("-DBUILD_TESTS=ON"))) diff --git a/gnu/packages/patches/cppcheck-disable-char-signedness-test.patch b/gnu/packages/patches/cppcheck-disable-char-signedness-test.patch deleted file mode 100644 index d39d300f84..0000000000 --- a/gnu/packages/patches/cppcheck-disable-char-signedness-test.patch +++ /dev/null @@ -1,27 +0,0 @@ -https://sources.debian.org/data/main/c/cppcheck/2.10-2/debian/patches/disable-some-tests-about-char-signedness -https://trac.cppcheck.net/ticket/11537 - -Description: Disable some tests affected by char signedness. -Author: Joachim Reichel -Bug: https://trac.cppcheck.net/ticket/11537 - -Index: cppcheck/test/testcondition.cpp -=================================================================== ---- cppcheck.orig/test/testcondition.cpp -+++ cppcheck/test/testcondition.cpp -@@ -4939,6 +4939,7 @@ private: - "}\n"); - ASSERT_EQUALS("[test.cpp:4]: (style) Condition 'it!=vector.end()' is always true\n", errout.str()); - -+#if 0 - // #11303 - check("void f(int n) {\n" - " std::vector buffer(n);\n" -@@ -4947,6 +4948,7 @@ private: - " buffer.back() == '\\0') {}\n" - "}\n"); - ASSERT_EQUALS("[test.cpp:5]: (style) Condition 'buffer.back()=='\\0'' is always false\n", errout.str()); -+#endif - - // #9353 - check("typedef struct { std::string s; } X;\n" diff --git a/gnu/packages/patches/cppcheck-fix-basedir-test.patch b/gnu/packages/patches/cppcheck-fix-basedir-test.patch new file mode 100644 index 0000000000..06a1422629 --- /dev/null +++ b/gnu/packages/patches/cppcheck-fix-basedir-test.patch @@ -0,0 +1,36 @@ +Fix the test "TestFileLister" by giving precisely the source directory instead of guessing it. +Author: Florent Pruvost + +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index 467e6e95e..d68d83e3d 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -85,6 +85,7 @@ if (BUILD_TESTS) + elseif(TEST ${NAME}) + else() + add_test(NAME ${NAME} COMMAND $ ${NAME} WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) ++ set_tests_properties(${NAME} PROPERTIES ENVIRONMENT "PROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR}") + endif() + endfunction() + +diff --git a/test/testfilelister.cpp b/test/testfilelister.cpp +index 3e2f56dfc..ecf0f9c6e 100644 +--- a/test/testfilelister.cpp ++++ b/test/testfilelister.cpp +@@ -45,15 +45,7 @@ private: + + // TODO: generate file list instead + static std::string findBaseDir() { +- std::string basedir; +- while (!Path::isDirectory(Path::join(basedir, ".github"))) { +- const std::string abspath = Path::getAbsoluteFilePath(basedir); +- basedir += "../"; +- // no more going up +- if (Path::getAbsoluteFilePath(basedir) == abspath) +- throw std::runtime_error("could not find repository root directory"); +- } +- return basedir; ++ return Path::getAbsoluteFilePath(std::getenv("PROJECT_SOURCE_DIR")) + "/"; + } + + void recursiveAddFiles() const { base-commit: 6036f1f3053bc9b4f0411b5e8aeaab5bd7f4ec7b -- 2.43.0 ------------=_1744703102-20030-1--