diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index caf8c60f3a5..c572a5151f1 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -694,8 +694,7 @@ if(${lmdb}) set(LMDB_LIBS bareoslmdb) endif() -# info what the config files need to be installed -##### PLUGINS ############ +# info what the config files need to be installed PLUGINS ############ set(PLUGINS python-ldap-conf.d) list(APPEND PLUGINS python-ovirt-conf.d) @@ -929,8 +928,6 @@ message(" HAVE_IS_TRIVIALLY_COPYABLE: ${HAVE_IS_TRIVIALLY_COPYABLE}") message(" do-static-code-checks: ${DO_STATIC_CODE_CHECKS}") - - if(DO_STATIC_CODE_CHECKS) message(" static code check tools:") message( diff --git a/core/src/cats/CMakeLists.txt b/core/src/cats/CMakeLists.txt index f2ca6c18729..54599ba23e7 100644 --- a/core/src/cats/CMakeLists.txt +++ b/core/src/cats/CMakeLists.txt @@ -45,9 +45,8 @@ set(POSTGRESQL_SRCS postgresql.cc ${LIBBAREOSCATS_SRCS}) add_library(bareossql SHARED ${LIBBAREOSSQL_SRCS}) set_target_properties( - bareossql - PROPERTIES VERSION "${BAREOS_NUMERIC_VERSION}" SOVERSION - "${BAREOS_VERSION_MAJOR}" + bareossql PROPERTIES VERSION "${BAREOS_NUMERIC_VERSION}" SOVERSION + "${BAREOS_VERSION_MAJOR}" ) target_link_libraries(bareossql bareoscats bareos) @@ -61,9 +60,8 @@ list(LENGTH db_backends nr_db_backends) add_library(bareoscats SHARED ${LIBBAREOSCATS_SRCS}) target_link_libraries(bareoscats bareos) set_target_properties( - bareoscats - PROPERTIES VERSION ${BAREOS_NUMERIC_VERSION} SOVERSION - "${BAREOS_VERSION_MAJOR}" + bareoscats PROPERTIES VERSION ${BAREOS_NUMERIC_VERSION} SOVERSION + "${BAREOS_VERSION_MAJOR}" ) install(TARGETS bareoscats DESTINATION ${libdir}) diff --git a/core/src/console/CMakeLists.txt b/core/src/console/CMakeLists.txt index 43bb680c20a..bf671842dc2 100644 --- a/core/src/console/CMakeLists.txt +++ b/core/src/console/CMakeLists.txt @@ -45,16 +45,8 @@ endif() target_link_libraries(bconsole ${CONSOLE_LINK_LIBRARIES}) -install( - TARGETS bconsole - DESTINATION "${bindir}" - COMPONENT bconsole -) -install( - TARGETS bconsole - DESTINATION "${sbindir}" - COMPONENT bconsole -) +install(TARGETS bconsole DESTINATION "${bindir}" COMPONENT bconsole) +install(TARGETS bconsole DESTINATION "${sbindir}" COMPONENT bconsole) install( FILES bconsole.conf DESTINATION "${configtemplatedir}" diff --git a/core/src/fastlz/CMakeLists.txt b/core/src/fastlz/CMakeLists.txt index 70e370f1f00..bd6196f1182 100644 --- a/core/src/fastlz/CMakeLists.txt +++ b/core/src/fastlz/CMakeLists.txt @@ -31,7 +31,6 @@ target_include_directories( target_compile_definitions(bareosfastlz PRIVATE "-DDLL_EXPORT") install(TARGETS bareosfastlz DESTINATION ${libdir}) set_target_properties( - bareosfastlz - PROPERTIES VERSION "${BAREOS_NUMERIC_VERSION}" SOVERSION - "${BAREOS_VERSION_MAJOR}" + bareosfastlz PROPERTIES VERSION "${BAREOS_NUMERIC_VERSION}" SOVERSION + "${BAREOS_VERSION_MAJOR}" ) diff --git a/core/src/filed/CMakeLists.txt b/core/src/filed/CMakeLists.txt index ea0775b74b1..4a8ce61a9ee 100644 --- a/core/src/filed/CMakeLists.txt +++ b/core/src/filed/CMakeLists.txt @@ -89,11 +89,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") ) endif() -install( - TARGETS bareos-fd - DESTINATION "${sbindir}" - COMPONENT filedaemon -) +install(TARGETS bareos-fd DESTINATION "${sbindir}" COMPONENT filedaemon) install(CODE "set(PLUGINS \"${PLUGINS}\")" COMPONENT filedaemon) install(CODE "set(BACKENDS \"${BACKENDS}\")" COMPONENT filedaemon) diff --git a/core/src/findlib/CMakeLists.txt b/core/src/findlib/CMakeLists.txt index 4b71d94c2cc..901d6dc4044 100644 --- a/core/src/findlib/CMakeLists.txt +++ b/core/src/findlib/CMakeLists.txt @@ -44,17 +44,11 @@ add_library(bareosfind SHARED ${BAREOSFIND_SRCS}) target_link_libraries(bareosfind bareos ${ACL_LIBS}) -install( - TARGETS bareosfind - DESTINATION ${libdir} - COMPONENT filedaemon -) +install(TARGETS bareosfind DESTINATION ${libdir} COMPONENT filedaemon) set_target_properties( - bareosfind - PROPERTIES VERSION "${BAREOS_NUMERIC_VERSION}" - SOVERSION "${BAREOS_VERSION_MAJOR}" - DEFINE_SYMBOL "BUILDING_DLL" + bareosfind PROPERTIES VERSION "${BAREOS_NUMERIC_VERSION}" SOVERSION + "${BAREOS_VERSION_MAJOR}" DEFINE_SYMBOL "BUILDING_DLL" ) if(HAVE_WIN32) set_target_properties(bareosfind PROPERTIES DEFINE_SYMBOL "BUILDING_DLL") diff --git a/core/src/lib/CMakeLists.txt b/core/src/lib/CMakeLists.txt index c49c797ffc8..1b166b518ea 100644 --- a/core/src/lib/CMakeLists.txt +++ b/core/src/lib/CMakeLists.txt @@ -228,9 +228,8 @@ target_link_libraries( install(TARGETS bareos DESTINATION ${libdir}) set_target_properties( - bareos - PROPERTIES VERSION "${BAREOS_NUMERIC_VERSION}" SOVERSION - "${BAREOS_VERSION_MAJOR}" + bareos PROPERTIES VERSION "${BAREOS_NUMERIC_VERSION}" SOVERSION + "${BAREOS_VERSION_MAJOR}" ) if(HAVE_WIN32) diff --git a/core/src/lmdb/CMakeLists.txt b/core/src/lmdb/CMakeLists.txt index 38ae0badbb0..faa539736cd 100644 --- a/core/src/lmdb/CMakeLists.txt +++ b/core/src/lmdb/CMakeLists.txt @@ -27,9 +27,8 @@ add_library(bareoslmdb SHARED mdb.c midl.c) set_property(TARGET bareoslmdb PROPERTY INCLUDE_DIRECTORIES "") set_target_properties( - bareoslmdb - PROPERTIES VERSION "${BAREOS_NUMERIC_VERSION}" SOVERSION - "${BAREOS_VERSION_MAJOR}" + bareoslmdb PROPERTIES VERSION "${BAREOS_NUMERIC_VERSION}" SOVERSION + "${BAREOS_VERSION_MAJOR}" ) if(HAVE_WIN32) set_target_properties(bareoslmdb PROPERTIES DEFINE_SYMBOL "BUILDING_DLL") diff --git a/core/src/ndmp/CMakeLists.txt b/core/src/ndmp/CMakeLists.txt index dfbf768ad6f..9198f4f3288 100644 --- a/core/src/ndmp/CMakeLists.txt +++ b/core/src/ndmp/CMakeLists.txt @@ -187,9 +187,8 @@ target_link_libraries(bareosndmp ${WRAP_LIBS} ${TIRPC_LIBRARIES}) install(TARGETS bareosndmp DESTINATION ${libdir}) set_target_properties( - bareosndmp - PROPERTIES VERSION "${BAREOS_NUMERIC_VERSION}" SOVERSION - "${BAREOS_VERSION_MAJOR}" + bareosndmp PROPERTIES VERSION "${BAREOS_NUMERIC_VERSION}" SOVERSION + "${BAREOS_VERSION_MAJOR}" ) if(build_ndmjob) add_executable(ndmjob ${NDMJOB_SRCS}) diff --git a/core/src/plugins/filed/CMakeLists.txt b/core/src/plugins/filed/CMakeLists.txt index b2a7e0cbd69..85af2718121 100644 --- a/core/src/plugins/filed/CMakeLists.txt +++ b/core/src/plugins/filed/CMakeLists.txt @@ -46,11 +46,7 @@ include_directories(${OPENSSL_INCLUDE_DIR}) add_library(bpipe-fd MODULE bpipe-fd.cc) set_target_properties(bpipe-fd PROPERTIES PREFIX "") -install( - TARGETS bpipe-fd - DESTINATION ${plugindir} - COMPONENT filedaemon -) +install(TARGETS bpipe-fd DESTINATION ${plugindir} COMPONENT filedaemon) if(HAVE_WIN32 OR HAVE_DARWIN_OS) target_link_libraries(bpipe-fd bareos) endif() @@ -62,32 +58,20 @@ if(HAVE_WIN32) mssqlvdi-fd PROPERTIES PREFIX "" DEFINE_SYMBOL "BUILDING_DLL" ) - install( - TARGETS mssqlvdi-fd - DESTINATION ${plugindir} - COMPONENT filedaemon - ) + install(TARGETS mssqlvdi-fd DESTINATION ${plugindir} COMPONENT filedaemon) target_link_libraries(mssqlvdi-fd bareos) endif() if(${HAVE_CEPHFS}) add_library(cephfs-fd MODULE cephfs-fd.cc) set_target_properties(cephfs-fd PROPERTIES PREFIX "") - install( - TARGETS cephfs-fd - DESTINATION ${plugindir} - COMPONENT filedaemon - ) + install(TARGETS cephfs-fd DESTINATION ${plugindir} COMPONENT filedaemon) endif() if(${HAVE_CEPH_RADOS}) add_library(rados-fd MODULE rados-fd.cc) set_target_properties(rados-fd PROPERTIES PREFIX "") - install( - TARGETS rados-fd - DESTINATION ${plugindir} - COMPONENT filedaemon - ) + install(TARGETS rados-fd DESTINATION ${plugindir} COMPONENT filedaemon) endif() if(NOT HAVE_WIN32) @@ -98,22 +82,14 @@ endif() if(HAVE_PYTHON) add_library(python-fd MODULE python-fd.cc) set_target_properties(python-fd PROPERTIES PREFIX "") - install( - TARGETS python-fd - DESTINATION ${plugindir} - COMPONENT filedaemon - ) + install(TARGETS python-fd DESTINATION ${plugindir} COMPONENT filedaemon) target_link_libraries(python-fd ${PYTHON_LIBRARIES} bareos) endif() if(${HAVE_GLUSTERFS}) add_library(gfapi-fd MODULE gfapi-fd.cc) set_target_properties(gfapi-fd PROPERTIES PREFIX "") - install( - TARGETS gfapi-fd - DESTINATION ${plugindir} - COMPONENT filedaemon - ) + install(TARGETS gfapi-fd DESTINATION ${plugindir} COMPONENT filedaemon) target_link_libraries(gfapi-fd gfapi) endif() @@ -121,11 +97,7 @@ if(${HAVE_TEST_PLUGIN}) add_library(test-plugin-fd MODULE test-plugin-fd.cc) # do not prefix with "lib" set_target_properties(test-plugin-fd PROPERTIES PREFIX "") - install( - TARGETS test-plugin-fd - DESTINATION ${plugindir} - COMPONENT filedaemon - ) + install(TARGETS test-plugin-fd DESTINATION ${plugindir} COMPONENT filedaemon) endif() set(PYFILES @@ -136,16 +108,13 @@ set(PYFILES BareosFdPluginLocalFileset.py BareosFdWrapper.py bareos_fd_consts.py - bareos-fd-ldap.py BareosFdPluginLDAP.py - bareos-fd-ovirt.py BareosFdPluginOvirt.py - bareos-fd-percona-xtrabackup.py BareosFdPluginPerconaXtraBackup.py - ) +) install( FILES ${PYFILES} diff --git a/core/src/stored/CMakeLists.txt b/core/src/stored/CMakeLists.txt index 6ab95a9ee79..69eeddb1729 100644 --- a/core/src/stored/CMakeLists.txt +++ b/core/src/stored/CMakeLists.txt @@ -233,8 +233,8 @@ target_link_libraries(bcopy bareossd bareos) install(TARGETS bareossd DESTINATION ${libdir}) -install(TARGETS bareos-sd bls bextract bscan btape bcopy - DESTINATION "${sbindir}" +install(TARGETS bareos-sd bls bextract bscan btape bcopy DESTINATION + "${sbindir}" ) install(CODE "set(PLUGINS \"${PLUGINS}\")") diff --git a/core/src/tests/CMakeLists.txt b/core/src/tests/CMakeLists.txt index ccaa737c446..efb40756339 100644 --- a/core/src/tests/CMakeLists.txt +++ b/core/src/tests/CMakeLists.txt @@ -386,10 +386,9 @@ if(NOT HAVE_WIN32 AND NOT client-only) ) endif() # NOT HAVE_WIN32 AND NOT client-only - if(NOT client-only) bareos_add_test( sort_stringvector LINK_LIBRARIES bareos ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES} -) + ) endif() # NOT client-only diff --git a/docs/manuals/CMakeLists.txt b/docs/manuals/CMakeLists.txt index a4890855f2c..0d4bbadd5c2 100644 --- a/docs/manuals/CMakeLists.txt +++ b/docs/manuals/CMakeLists.txt @@ -134,8 +134,7 @@ endif() # target: docs ###### add_custom_target( - docs - ${DOCS_ALL} + docs ${DOCS_ALL} COMMAND ${SPHINX_COMMAND} -M html "${SPHINX_SOURCE_DIR}" "${SPHINX_BUILDDIR}" "${SPHINX_OPTS}" DEPENDS $<$:clean-docs> diff --git a/systemtests/CMakeLists.txt b/systemtests/CMakeLists.txt index d3dbe59d913..899b487cf48 100644 --- a/systemtests/CMakeLists.txt +++ b/systemtests/CMakeLists.txt @@ -22,9 +22,8 @@ project(bareos-systemtests) cmake_policy(SET CMP0057 NEW) # IF(.. IN_LIST ..) cmake_policy(SET CMP0053 NEW) -# create a variable BINARY_NAME_TO_TEST for each binary name -# bareos-dir -> BAREOS_DIR_TO_TEST -# bconsole -> BCONSOLE_TO_TEST +# create a variable BINARY_NAME_TO_TEST for each binary name bareos-dir -> +# BAREOS_DIR_TO_TEST bconsole -> BCONSOLE_TO_TEST macro(create_variable_BINARY_NAME_TO_TEST_for_binary_name binary_name) string(TOUPPER ${binary_name} binary_name_to_test_upcase) string(REPLACE "-" "_" binary_name_to_test_upcase @@ -33,36 +32,38 @@ macro(create_variable_BINARY_NAME_TO_TEST_for_binary_name binary_name) string(APPEND binary_name_to_test_upcase _TO_TEST) endmacro() - -# find the full path of the given binary when *compiling* the software -# and create and set the BINARY_NAME_TO_TEST variable to the full path of it +# find the full path of the given binary when *compiling* the software and +# create and set the BINARY_NAME_TO_TEST variable to the full path of it macro(find_compiled_binary_and_set_BINARY_NAME_TO_TEST_variable_for binary_name) - create_variable_BINARY_NAME_TO_TEST_for_binary_name(${binary_name}) + create_variable_binary_name_to_test_for_binary_name(${binary_name}) get_target_property( "${binary_name_to_test_upcase}" "${binary_name}" BINARY_DIR ) set("${binary_name_to_test_upcase}" "${${binary_name_to_test_upcase}}/${binary_name}" ) - message( " ${binary_name_to_test_upcase} is ${${binary_name_to_test_upcase}}") + message( + " ${binary_name_to_test_upcase} is ${${binary_name_to_test_upcase}}" + ) endmacro() -# find the full path of the given binary in the *installed* binaries -# and create and set the BINARY_NAME_TO_TEST variable to the full path of it +# find the full path of the given binary in the *installed* binaries and create +# and set the BINARY_NAME_TO_TEST variable to the full path of it macro(find_installed_binary_and_set_BINARY_NAME_TO_TEST_variable_for binary_name ) - create_variable_BINARY_NAME_TO_TEST_for_binary_name(${binary_name}) + create_variable_binary_name_to_test_for_binary_name(${binary_name}) find_program( "${binary_name_to_test_upcase}" ${binary_name} PATHS /usr/bin /usr/sbin /bin /sbin ) set("${binary_name_to_test_upcase}" "${${binary_name_to_test_upcase}}") - message( " ${binary_name_to_test_upcase} is ${${binary_name_to_test_upcase}}") + message( + " ${binary_name_to_test_upcase} is ${${binary_name_to_test_upcase}}" + ) endmacro() - function(ConfigureFilesToSystemtest srcbasedir dirname globexpression configure_option srcdirname ) @@ -215,19 +216,15 @@ endmacro() macro(link_binaries_to_test_to_current_sbin_dir_with_individual_filename) foreach(binary_name ${ALL_BINARIES_BEING_USED_BY_SYSTEMTESTS}) - create_variable_BINARY_NAME_TO_TEST_for_binary_name(${binary_name}) + create_variable_binary_name_to_test_for_binary_name(${binary_name}) string(REPLACE "-" "_" binary_name ${binary_name}) string(TOUPPER ${binary_name} binary_name_upcase) - string(CONCAT bareos_XXX_binary ${binary_name_upcase} "_BINARY" ) - #message (STATUS "${bareos_XXX_binary}") - set( ${bareos_XXX_binary} ${CURRENT_SBIN_DIR}/${binary_name}-${TEST_NAME} ) - #message( - # "creating symlink ${${bareos_XXX_binary}} -> ${${binary_name_to_test_upcase}}" - #) - create_symlink( - ${${binary_name_to_test_upcase}} - ${${bareos_XXX_binary}} - ) + string(CONCAT bareos_XXX_binary ${binary_name_upcase} "_BINARY") + # message (STATUS "${bareos_XXX_binary}") + set(${bareos_XXX_binary} ${CURRENT_SBIN_DIR}/${binary_name}-${TEST_NAME}) + # message( "creating symlink ${${bareos_XXX_binary}} -> + # ${${binary_name_to_test_upcase}}" ) + create_symlink(${${binary_name_to_test_upcase}} ${${bareos_XXX_binary}}) endforeach() endmacro() @@ -321,10 +318,9 @@ macro(create_symlink target link) execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${target} ${link}) endmacro() +# Main starts here... -### Main starts here... - -message( "Entering ${CMAKE_CURRENT_SOURCE_DIR}") +message("Entering ${CMAKE_CURRENT_SOURCE_DIR}") find_program(PERL perl) @@ -369,11 +365,9 @@ set(AVAILABLE_WEBUI_SELENIUM_TESTS "readonly-run_default_job" ) - - - -message(STATUS - "RUN_SYSTEMTESTS_ON_INSTALLED_FILES: ${RUN_SYSTEMTESTS_ON_INSTALLED_FILES}" +message( + STATUS + "RUN_SYSTEMTESTS_ON_INSTALLED_FILES: ${RUN_SYSTEMTESTS_ON_INSTALLED_FILES}" ) message(STATUS "Looking for binaries and paths...") @@ -408,9 +402,7 @@ if(RUN_SYSTEMTESTS_ON_INSTALLED_FILES) get_filename_component( SCRIPTS_DIR_TO_TEST ${CREATE_BAREOS_DATABASE_TO_TEST} DIRECTORY ) - get_filename_component( - BACKEND_DIR_TO_TEST ${BACKEND_DIR_TO_TEST} DIRECTORY - ) + get_filename_component(BACKEND_DIR_TO_TEST ${BACKEND_DIR_TO_TEST} DIRECTORY) set(FD_PLUGINS_DIR_TO_TEST ${PLUGINS_DIR_TO_TEST}) set(SD_PLUGINS_DIR_TO_TEST ${PLUGINS_DIR_TO_TEST}) @@ -441,8 +433,7 @@ file(STRINGS ${CMAKE_SOURCE_DIR}/core/src/cats/cats.h DB_VERSION_STRING REGEX .*BDB_VERSION.* ) string(REGEX MATCH [0-9]+ BDB_VERSION ${DB_VERSION_STRING}) -message (STATUS "db version from cat.sh is ${BDB_VERSION}") - +message(STATUS "db version from cat.sh is ${BDB_VERSION}") # set variable values to be replaced by configure_file set(DEFAULT_DB_TYPE # ${default_db_backend}) @@ -452,7 +443,6 @@ message(STATUS "DEFAULT_DB_TYPE is ${DEFAULT_DB_TYPE}") set(archivedir "${PROJECT_BINARY_DIR}/archivedir") - set(bin ${PROJECT_BINARY_DIR}/bin) set(bindir ${PROJECT_BINARY_DIR}/bin) @@ -594,7 +584,6 @@ else() message(STATUS "disabling catalog test as gtest was not found") endif() - if(TARGET python-fd) list(APPEND SYSTEM_TESTS "python-fd-plugin-local-fileset-test") else() @@ -604,14 +593,19 @@ endif() if(TARGET python-fd AND ovirt_server) list(APPEND SYSTEM_TESTS "python-fd-ovirt-plugin-test") else() - message(STATUS "disabling python-fd-ovirt-plugin-test as ovirt_server is not set") + message( + STATUS "disabling python-fd-ovirt-plugin-test as ovirt_server is not set" + ) list(APPEND SYSTEM_TESTS_DISABLED "python-fd-ovirt-plugin-test") endif() if(TARGET python-fd AND XTRABACKUP) list(APPEND SYSTEM_TESTS "python-fd-percona-xtrabackup-plugin-test") else() - message(STATUS "disabling python-fd-percona-xtrabackup-plugin-test as XTRABACKUP was not found") + message( + STATUS + "disabling python-fd-percona-xtrabackup-plugin-test as XTRABACKUP was not found" + ) list(APPEND SYSTEM_TESTS_DISABLED "python-fd-percona-xtrabackup-plugin-test") endif() @@ -627,15 +621,18 @@ else() list(APPEND SYSTEM_TESTS_DISABLED "python-sd-plugin-test") endif() - message(STATUS "Looking for pam test requirements ...") find_program(PYTHON python) bareosfindlibraryandheaders("pam" "security/pam_appl.h") find_program(PAMTESTER pamtester) set(ENV{PAM_WRAPPER_LIBRARIES} "${PAM_WRAPPER_LIBRARIES}") -execute_process( COMMAND "${CMAKE_SOURCE_DIR}/systemtests/tests/bconsole-pam/bin/check_pam_exec_available.sh" - WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/systemtests/tests/bconsole-pam/" RESULT_VARIABLE PAM_EXEC_AVAILABLE_RC) +execute_process( + COMMAND + "${CMAKE_SOURCE_DIR}/systemtests/tests/bconsole-pam/bin/check_pam_exec_available.sh" + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/systemtests/tests/bconsole-pam/" + RESULT_VARIABLE PAM_EXEC_AVAILABLE_RC +) if(PAM_EXEC_AVAILABLE_RC EQUAL "0") set(PAM_EXEC_AVAILABLE TRUE) endif() @@ -644,34 +641,33 @@ message(" PAM_WRAPPER_LIBRARIES: " ${PAM_WRAPPER_LIBRARIES}) message(" PAMTESTER: " ${PAMTESTER}) message(" PAM_EXEC_AVAILABLE: " ${PAM_EXEC_AVAILABLE}) -if (PAM_WRAPPER_LIBRARIES AND PAMTESTER AND PAM_EXEC_AVAILABLE AND PAM_FOUND) +if(PAM_WRAPPER_LIBRARIES + AND PAMTESTER + AND PAM_EXEC_AVAILABLE + AND PAM_FOUND +) set(ENABLE_BCONSOLE_PAM_TEST TRUE) message(STATUS "OK: all requirements for pam tests were met.") else() set(ENABLE_BCONSOLE_PAM_TEST FALSE) - message(STATUS "NOT OK: disabling pam tests as not all requirements were found.") + message( + STATUS "NOT OK: disabling pam tests as not all requirements were found." + ) endif() - if(ENABLE_BCONSOLE_PAM_TEST) list(APPEND SYSTEM_TESTS "bconsole-pam") else() list(APPEND SYSTEM_TESTS_DISABLED "bconsole-pam") endif() - # python-bareos does not work on installed files and is used here -if(ENABLE_BCONSOLE_PAM_TEST AND NOT RUN_SYSTEMTESTS_ON_INSTALLED_FILES ) +if(ENABLE_BCONSOLE_PAM_TEST AND NOT RUN_SYSTEMTESTS_ON_INSTALLED_FILES) list(APPEND SYSTEM_TESTS "python-pam") else() list(APPEND SYSTEM_TESTS_DISABLED "python-pam") endif() - - - - - message(STATUS "Looking for webui test requirements ...") find_program(PHP php) @@ -683,12 +679,18 @@ message(" PYTHON: " ${PYTHON}) message(" PYTHON_SELENIUM_FOUND: " ${PYTHON_SELENIUM_FOUND}) message(" CHROMEDRIVER: " ${CHROMEDRIVER}) -if (PHP AND PYTHON AND PYTHON_SELENIUM_FOUND AND CHROMEDRIVER) +if(PHP + AND PYTHON + AND PYTHON_SELENIUM_FOUND + AND CHROMEDRIVER +) set(ENABLE_WEBUI_SELENIUM_TEST TRUE) message(STATUS "OK: all requirements for webui tests were met.") else() set(ENABLE_WEBUI_SELENIUM_TEST FALSE) - message(STATUS "NOT OK: disabling webui tests as not all requirements were found.") + message( + STATUS "NOT OK: disabling webui tests as not all requirements were found." + ) endif() if(ENABLE_WEBUI_SELENIUM_TEST) @@ -696,9 +698,18 @@ if(ENABLE_WEBUI_SELENIUM_TEST) else() set(WEBUI_SELENIUM_TESTS) foreach(TEST_NAME_DISABLED ${AVAILABLE_WEBUI_SELENIUM_TESTS}) - add_test(NAME ${WEBUI_TEST_PREFIX}${SOURCETREE_OR_PACKAGE}${TEST_NAME_DISABLED} COMMAND empty_command) - set_tests_properties(${WEBUI_TEST_PREFIX}${SOURCETREE_OR_PACKAGE}${TEST_NAME_DISABLED} PROPERTIES DISABLED true) - message(STATUS "Disabled test: ${WEBUI_TEST_PREFIX}${SOURCETREE_OR_PACKAGE}${TEST_NAME_DISABLED}") + add_test( + NAME ${WEBUI_TEST_PREFIX}${SOURCETREE_OR_PACKAGE}${TEST_NAME_DISABLED} + COMMAND empty_command + ) + set_tests_properties( + ${WEBUI_TEST_PREFIX}${SOURCETREE_OR_PACKAGE}${TEST_NAME_DISABLED} + PROPERTIES DISABLED true + ) + message( + STATUS + "Disabled test: ${WEBUI_TEST_PREFIX}${SOURCETREE_OR_PACKAGE}${TEST_NAME_DISABLED}" + ) endforeach() endif() @@ -712,7 +723,10 @@ else() endif() foreach(TEST_NAME ${SYSTEM_TESTS}) - message (STATUS "Configuring test: ${SYSTEMTEST_PREFIX}${SOURCETREE_OR_PACKAGE}${TEST_NAME}") + message( + STATUS + "Configuring test: ${SYSTEMTEST_PREFIX}${SOURCETREE_OR_PACKAGE}${TEST_NAME}" + ) prepare_test() configurefilestosystemtest("systemtests" "tests/${TEST_NAME}" "*" @ONLY "") @@ -732,13 +746,14 @@ foreach(TEST_NAME ${SYSTEM_TESTS}) endforeach() - - set(WEBUI_TEST_PREFIX "webui:") # webui specific settings if(ENABLE_WEBUI_SELENIUM_TEST) foreach(TEST_NAME ${WEBUI_SELENIUM_TESTS}) - message (STATUS "Configuring test: ${WEBUI_TEST_PREFIX}${SOURCETREE_OR_PACKAGE}${TEST_NAME}") + message( + STATUS + "Configuring test: ${WEBUI_TEST_PREFIX}${SOURCETREE_OR_PACKAGE}${TEST_NAME}" + ) prepare_test() prepare_testdir_for_daemon_run() @@ -796,8 +811,16 @@ endif() foreach(TEST_NAME_DISABLED ${SYSTEM_TESTS_DISABLED}) checkforenabledanddisabledlistentry(${TEST_NAME_DISABLED}) - add_test(NAME ${SYSTEMTEST_PREFIX}${SOURCETREE_OR_PACKAGE}${TEST_NAME_DISABLED} COMMAND empty_command) - set_tests_properties(${SYSTEMTEST_PREFIX}${SOURCETREE_OR_PACKAGE}${TEST_NAME_DISABLED} PROPERTIES DISABLED true) - message(STATUS "Disabled test: ${SYSTEMTEST_PREFIX}${SOURCETREE_OR_PACKAGE}${TEST_NAME_DISABLED}") + add_test( + NAME ${SYSTEMTEST_PREFIX}${SOURCETREE_OR_PACKAGE}${TEST_NAME_DISABLED} + COMMAND empty_command + ) + set_tests_properties( + ${SYSTEMTEST_PREFIX}${SOURCETREE_OR_PACKAGE}${TEST_NAME_DISABLED} + PROPERTIES DISABLED true + ) + message( + STATUS + "Disabled test: ${SYSTEMTEST_PREFIX}${SOURCETREE_OR_PACKAGE}${TEST_NAME_DISABLED}" + ) endforeach() -