diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2023-04-26 09:30:07 +0300 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2023-04-26 10:51:44 +0300 |
commit | 8720e22fd071e1717023a7895b721ccd160c06a6 (patch) | |
tree | 232f201227df56dbc24befdcd12b771f72de39ad /gnu/packages | |
parent | ff4e463ddce78e5ca02de80b594150692c72e66c (diff) |
gnu: cppcheck: Skip failing test.
* gnu/packages/patches/check.scm (cppcheck)[source]: Add patch.
* gnu/packages/patches/cppcheck-disable-char-signedness-test.patch: New
file.
* gnu/local.mk (dist_patch_DATA): Register it.
Diffstat (limited to 'gnu/packages')
-rw-r--r-- | gnu/packages/check.scm | 3 | ||||
-rw-r--r-- | gnu/packages/patches/cppcheck-disable-char-signedness-test.patch | 27 |
2 files changed, 29 insertions, 1 deletions
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 1ac87578ce..db766f03ee 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -745,7 +745,8 @@ format.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "0riq7jlv21v2p77r01i36ll3klbgnkpsfk1wx4q8p1v5h5zgkkaa")))) + (base32 "0riq7jlv21v2p77r01i36ll3klbgnkpsfk1wx4q8p1v5h5zgkkaa")) + (patches (search-patches "cppcheck-disable-char-signedness-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 new file mode 100644 index 0000000000..d39d300f84 --- /dev/null +++ b/gnu/packages/patches/cppcheck-disable-char-signedness-test.patch @@ -0,0 +1,27 @@ +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 <reichel@debian.org> +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<char> 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" |