Skip to content

Commit

Permalink
system tests: skip catalog test if gtest not available
Browse files Browse the repository at this point in the history
  • Loading branch information
pstorz committed Jan 24, 2020
1 parent e581cfd commit d6b80bb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions core/src/CMakeLists.txt
@@ -1,6 +1,6 @@
# BAREOS® - Backup Archiving REcovery Open Sourced
#
# Copyright (C) 2017-2019 Bareos GmbH & Co. KG
# Copyright (C) 2017-2020 Bareos GmbH & Co. KG
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of version three of the GNU Affero General Public
Expand All @@ -27,7 +27,11 @@ if(NOT client-only)
add_subdirectory(stored)
endif()

if(GTEST_FOUND)
if(RUN_SYSTEMTESTS_ON_INSTALLED_FILES)
message(status "Skipping unit tests as testing on installed files is requested")
elseif(NOT GTEST_FOUND)
message(status "Skipping unit tests as gtest was not found")
else()
add_subdirectory(tests)
endif()

Expand Down
4 changes: 2 additions & 2 deletions systemtests/CMakeLists.txt
Expand Up @@ -576,9 +576,9 @@ else()
endif()

bareosfindlibrary("gtest")
if(GTEST_FOUND)
if(GTEST_FOUND AND NOT RUN_SYSTEMTESTS_ON_INSTALLED_FILES)
list(APPEND SYSTEM_TESTS "catalog")
message(STATUS "adding catalog test as gtest was found")
message(STATUS "adding catalog test as gtest was found and not testing installed files")
else()
list(APPEND SYSTEM_TESTS_DISABLED "catalog")
message(STATUS "disabling catalog test as gtest was not found")
Expand Down

0 comments on commit d6b80bb

Please sign in to comment.