poco: add checkPhase

This executes at least part of the testsutie.

All testsuites that require a service running in the background
(Postgress, MongoDB, MariaDB, ...) have been skipped. If one attempts to
run them, this likely requires a nixosTest to do so and provide the
dependencies.

Some tests I had to skip, because they break on darwin. Perhaps fixes
for theste test can be developed and upstreamed, but that requires more
expertise than I possess.
This commit is contained in:
‮rekcäH nitraM‮
2025-07-12 22:34:09 +02:00
committed by Martin Häcker
parent 99afe02b71
commit da47ff291b
2 changed files with 46 additions and 4 deletions
@@ -0,0 +1,21 @@
diff --git a/Data/testsuite/src/DataTest.cpp b/Data/testsuite/src/DataTest.cpp
index a78c4e5..e8d9335 100644
--- a/Data/testsuite/src/DataTest.cpp
+++ b/Data/testsuite/src/DataTest.cpp
@@ -1652 +1652 @@ CppUnit::Test* DataTest::suite()
- CppUnit_addTest(pSuite, DataTest, testSQLChannel);
+ // CppUnit_addTest(pSuite, DataTest, testSQLChannel);
diff --git a/Net/testsuite/src/HTTPClientSessionTest.cpp b/Net/testsuite/src/HTTPClientSessionTest.cpp
index 31de150..b5c0d13 100644
--- a/Net/testsuite/src/HTTPClientSessionTest.cpp
+++ b/Net/testsuite/src/HTTPClientSessionTest.cpp
@@ -406 +406 @@ CppUnit::Test* HTTPClientSessionTest::suite()
- CppUnit_addTest(pSuite, HTTPClientSessionTest, testGetSmallUnix);
+ // CppUnit_addTest(pSuite, HTTPClientSessionTest, testGetSmallUnix);
diff --git a/Net/testsuite/src/SocketTest.cpp b/Net/testsuite/src/SocketTest.cpp
index 27c1800..9bd684b 100644
--- a/Net/testsuite/src/SocketTest.cpp
+++ b/Net/testsuite/src/SocketTest.cpp
@@ -900 +900 @@ CppUnit::Test* SocketTest::suite()
- CppUnit_addTest(pSuite, SocketTest, testEchoUnixLocal);
+ // CppUnit_addTest(pSuite, SocketTest, testEchoUnixLocal);
+25 -4
View File
@@ -54,10 +54,23 @@ stdenv.mkDerivation rec {
MYSQL_DIR = libmysqlclient;
MYSQL_INCLUDE_DIR = "${MYSQL_DIR}/include/mysql";
cmakeFlags = [
# use nix provided versions of sqlite, zlib, pcre, expat, ... instead of bundled versions
(lib.cmakeBool "POCO_UNBUNDLED" true)
];
cmakeFlags =
let
# These tests require running services, which the checkPhase is ill equipeed to provide
# TODO get them running in a nixosTest
excludeTestsRegex = lib.concatStringsSep "|" [
"Redis"
"DataODBC"
"MongoDB"
"DataMySQL"
];
in
[
# use nix provided versions of sqlite, zlib, pcre, expat, ... instead of bundled versions
(lib.cmakeBool "POCO_UNBUNDLED" true)
(lib.cmakeBool "ENABLE_TESTS" true)
(lib.cmakeFeature "CMAKE_CTEST_ARGUMENTS" "--exclude-regex;'${excludeTestsRegex}'")
];
patches = [
# Remove on next release
@@ -67,8 +80,16 @@ stdenv.mkDerivation rec {
url = "https://patch-diff.githubusercontent.com/raw/pocoproject/poco/pull/4879.patch";
hash = "sha256-VFWuRuf0GPYFp43WKI8utl+agP+7a5biLg7m64EMnVo=";
})
# failing on darwin, could perhaps be patched / a fix upstreamed later
./disable-broken-tests.patch
];
doCheck = true;
preCheck = ''
# workaround for some tests trying to write to /homeless-shelter
export HOME=$(mktemp -d)
'';
postFixup = ''
grep -rlF INTERFACE_INCLUDE_DIRECTORIES "$dev/lib/cmake/Poco" | while read -r f; do
substituteInPlace "$f" \