Fix tests

This commit is contained in:
Andreas Schneider 2025-07-17 15:48:25 +02:00
commit bc462de7cd
2 changed files with 67 additions and 0 deletions

View file

@ -10,6 +10,8 @@ Source0: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz
Source1: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz.asc
Source2: uid_wrapper.keyring
Patch0: uwrap-fix-tests.patch
BuildRequires: gcc
BuildRequires: cmake
BuildRequires: gnupg2

65
uwrap-fix-tests.patch Normal file
View file

@ -0,0 +1,65 @@
From fb17ea0d4a346e21332f5eb32dcb02b2e57c2320 Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn@samba.org>
Date: Thu, 17 Jul 2025 15:19:39 +0200
Subject: [PATCH 1/2] cpack: Fix ignore files
Signed-off-by: Andreas Schneider <asn@samba.org>
---
CPackConfig.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CPackConfig.cmake b/CPackConfig.cmake
index 955c8ee..c1a3373 100644
--- a/CPackConfig.cmake
+++ b/CPackConfig.cmake
@@ -16,7 +16,7 @@ set(CPACK_PACKAGE_VERSION "${PROJECT_VERSION}")
### source generator
set(CPACK_SOURCE_GENERATOR "TGZ")
-set(CPACK_SOURCE_IGNORE_FILES "~$;[.]swp$;/[.]svn/;/[.]git/;.gitignore;/build*;/obj*;tags;cscope.*")
+set(CPACK_SOURCE_IGNORE_FILES "~$;\.swp$;\.git;\.gitignore;/\.cache/;/\.clangd/;/build*;/obj*;tags;cscope.*")
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
if (WIN32)
--
GitLab
From a85877afadfbca22b2d8927dca62d6cc0e25dd65 Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn@samba.org>
Date: Thu, 17 Jul 2025 15:20:43 +0200
Subject: [PATCH 2/2] tests: Add missing include for stdint.h
Signed-off-by: Andreas Schneider <asn@samba.org>
---
tests/test_thread_sync_setreuid.c | 1 +
tests/test_uwrap_disabled.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/tests/test_thread_sync_setreuid.c b/tests/test_thread_sync_setreuid.c
index 720a707..627791c 100644
--- a/tests/test_thread_sync_setreuid.c
+++ b/tests/test_thread_sync_setreuid.c
@@ -2,6 +2,7 @@
#include <stdarg.h>
#include <stddef.h>
+#include <stdint.h>
#include <setjmp.h>
#include <cmocka.h>
diff --git a/tests/test_uwrap_disabled.c b/tests/test_uwrap_disabled.c
index 52a2bf0..61a8c87 100644
--- a/tests/test_uwrap_disabled.c
+++ b/tests/test_uwrap_disabled.c
@@ -2,6 +2,7 @@
#include <stdarg.h>
#include <stddef.h>
+#include <stdint.h>
#include <setjmp.h>
#include <cmocka.h>
--
GitLab