[evolution-data-server] Make sure libdb addressbooks are available before book-migration test



commit b887e56e8dac1619ace1d4c1673c6ec9ccbf7375
Author: Milan Crha <mcrha redhat com>
Date:   Tue Mar 12 14:58:15 2019 +0100

    Make sure libdb addressbooks are available before book-migration test
    
    This will make sure the required databases are available before
    the migration test itself is built, which is not strictly necessary
    for the test build, but it also doesn't hurt and makes the dependency
    explicit.

 tests/book-migration/CMakeLists.txt | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/tests/book-migration/CMakeLists.txt b/tests/book-migration/CMakeLists.txt
index 93a657174..13e758532 100644
--- a/tests/book-migration/CMakeLists.txt
+++ b/tests/book-migration/CMakeLists.txt
@@ -1,3 +1,5 @@
+add_subdirectory(db)
+
 set(extra_deps
        ebook
        ebook-contacts
@@ -5,7 +7,6 @@ set(extra_deps
        client-test-utils
 )
 
-
 set(extra_defines
        -DEDS_TEST_WORK_DIR=\"${CMAKE_BINARY_DIR}/tests/test-server-utils/cache\"
        -DEDS_TEST_SQLITE_BOOKS=\"${CMAKE_SOURCE_DIR}/tests/book-migration/db\"
@@ -55,6 +56,9 @@ foreach(_test ${TESTS})
                extra_ldflags
        )
        add_check_test(${_test})
+       if(HAVE_DB_LOAD)
+               add_dependencies(${_test} libdb-addressbooks)
+       endif(HAVE_DB_LOAD)
 endforeach(_test)
 
 # This is a little cheat, it's not a real test, but can be built with the macro
@@ -92,5 +96,3 @@ add_custom_target(setup-migration
        COMMAND ${CMAKE_COMMAND} -E echo "Done."
        DEPENDS setup-migration-test
 )
-
-add_subdirectory(db)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]