Skip to content

Commit

Permalink
systemtests: run the catalog unittest from a systemtest only
Browse files Browse the repository at this point in the history
- do not run the catalog unittest with 'make test' or 'ctest'
- the catalog-'unittest' will be run from the catalog-'systemtest'
  • Loading branch information
franku committed Dec 12, 2019
1 parent d4562d7 commit b247b12
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
8 changes: 4 additions & 4 deletions core/src/tests/CMakeLists.txt
Expand Up @@ -342,8 +342,8 @@ if(NOT HAVE_WIN32 AND NOT client-only)
)
endif()

add_test(NAME catalog::postgresql COMMAND catalog TEST_PREFIX gtest:)
set_tests_properties(catalog::postgresql PROPERTIES
ENVIRONMENT CATALOG_BACKEND=postgresql
ENVIRONMENT BACKEND_DIRS=${CMAKE_BINARY_DIR}/core/src/cats)
#add_test(NAME catalog::postgresql COMMAND catalog TEST_PREFIX gtest:)
#set_tests_properties(catalog::postgresql PROPERTIES
# ENVIRONMENT CATALOG_BACKEND=postgresql
# ENVIRONMENT BACKEND_DIRS=${CMAKE_BINARY_DIR}/core/src/cats)

4 changes: 2 additions & 2 deletions core/src/tests/catalog.cc
Expand Up @@ -110,8 +110,8 @@ TEST_F(CatalogTest, database)

ASSERT_NE(testable_catalog_backends.find(catalog_backend_name),
testable_catalog_backends.end())
<< "Environment variable CATALOG_BACKEND does not contain a testable "
"catalog backend name.";
<< "Environment variable CATALOG_BACKEND does not contain a name for a "
"testable catalog backend.";

JobControlRecord* jcr = directordaemon::NewDirectorJcr();
jcr->impl->res.catalog =
Expand Down
4 changes: 2 additions & 2 deletions systemtests/environment.in
Expand Up @@ -78,6 +78,6 @@ export BAREOS_WEBUI_RESTOREFILE=${PROJECT_BINARY_DIR}
export BAREOS_WEBUI_LOG_PATH=${logdir}
export BAREOS_WEBUI_DELAY=1

export CATALOG_BACKEND=postgresql
export BACKEND_DIRS=/home/franku/01-prj/git/bareos-master/b/core/src/cats
export CATALOG_BACKEND=$DBTYPE
export BACKEND_DIRS=$backenddir

10 changes: 9 additions & 1 deletion systemtests/tests/catalog/testrunner
Expand Up @@ -12,6 +12,14 @@ export TestName
${scripts}/cleanup
${scripts}/setup

exit_failure()
{
estat=1
end_test
}

start_test
./../../../../b/core/src/tests/catalog

./../../../../b/core/src/tests/catalog || exit_failure

end_test

0 comments on commit b247b12

Please sign in to comment.