diff options
| author | Z. Liu <zhixu.liu@gmail.com> | 2025-01-12 23:37:00 +0800 |
|---|---|---|
| committer | Sam James <sam@gentoo.org> | 2025-01-14 07:01:50 +0000 |
| commit | 08bcbb8fa872ebfe830f17b8c89bdbaa01d1bc21 (patch) | |
| tree | 3b2c45b26d386efeb599fdad577e513f9406aee3 /dev-util/cpputest/files/cpputest-4.0-replace-UB-by-abort.patch | |
| parent | 11455cb3e18d922ef248d1965b4090897431012d (diff) | |
| download | gentoo-08bcbb8fa872ebfe830f17b8c89bdbaa01d1bc21.tar.gz gentoo-08bcbb8fa872ebfe830f17b8c89bdbaa01d1bc21.tar.bz2 gentoo-08bcbb8fa872ebfe830f17b8c89bdbaa01d1bc21.zip | |
dev-util/cpputest: fix configure & test
1. fix unexpected errors during configuration, patch submitted to upstream at
https://github.com/cpputest/cpputest/pull/1837
2. adopt patch from https://github.com/cpputest/cpputest/pull/1679, fix
tests hangs w/ clang
Closes: https://bugs.gentoo.org/879681
Closes: https://bugs.gentoo.org/924958
Signed-off-by: Z. Liu <zhixu.liu@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/40105
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-util/cpputest/files/cpputest-4.0-replace-UB-by-abort.patch')
| -rw-r--r-- | dev-util/cpputest/files/cpputest-4.0-replace-UB-by-abort.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/dev-util/cpputest/files/cpputest-4.0-replace-UB-by-abort.patch b/dev-util/cpputest/files/cpputest-4.0-replace-UB-by-abort.patch new file mode 100644 index 000000000000..54dbf24c9411 --- /dev/null +++ b/dev-util/cpputest/files/cpputest-4.0-replace-UB-by-abort.patch @@ -0,0 +1,33 @@ +fix tests hang with clang as reported in https://bugs.gentoo.org/924958 + +patch from upstream PR at https://github.com/cpputest/cpputest/pull/1679 +commit https://github.com/cpputest/cpputest/commit/094df52c8f6dae1dccb30d0d39dd1eb832ded85c +adapt to v4.0 + +diff --git a/src/CppUTest/Utest.cpp b/src/CppUTest/Utest.cpp +index d078bdf..3cbbcdf 100644 +--- a/src/CppUTest/Utest.cpp ++++ b/src/CppUTest/Utest.cpp +@@ -153,7 +153,7 @@ UtestShell::~UtestShell() + // LCOV_EXCL_START - actually covered but not in .gcno due to race condition + static void defaultCrashMethod() + { +- UtestShell* ptr = (UtestShell*) NULLPTR; ptr->countTests(); ++ abort(); + } + // LCOV_EXCL_STOP + +diff --git a/tests/CppUTest/UtestTest.cpp b/tests/CppUTest/UtestTest.cpp +index cf6ad1c..a26fb41 100644 +--- a/tests/CppUTest/UtestTest.cpp ++++ b/tests/CppUTest/UtestTest.cpp +@@ -222,8 +222,7 @@ TEST(UtestShell, TestDefaultCrashMethodInSeparateProcessTest) + fixture.runAllTests(); + fixture.assertPrintContains("Failed in separate process - killed by signal"); + +- /* Signal 11 usually happens, but with clang3.7 on Linux, it produced signal 4 */ +- CHECK(fixture.getOutput().contains("signal 11") || fixture.getOutput().contains("signal 4")); ++ CHECK(fixture.getOutput().contains("signal 6")); + } + + #endif |
