tests: Only add prctl test if we have support for it
authorAndreas Schneider <asn@samba.org>
Mon, 12 Sep 2022 07:03:14 +0000 (09:03 +0200)
committerAndreas Schneider <asn@samba.org>
Fri, 21 Oct 2022 08:01:11 +0000 (10:01 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
tests/CMakeLists.txt

index 7385512ece63530d07a236a99d89cd964def69e4..95f05e9ba5426f520885ed8eaa4821574bcadacf 100644 (file)
@@ -8,10 +8,13 @@ include_directories(
 )
 
 set(PWRAP_TESTS
-    test_prctl
     test_setrlimit
     test_chroot)
 
+if (HAVE_PRCTL)
+list(APPEND PWRAP_TESTS test_prctl)
+endif()
+
 function(ADD_CMOCKA_TEST_ENVIRONMENT _TEST_NAME)
     if (CMAKE_BUILD_TYPE)
         string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER)