From c1194a5ee8871346fac5f64c010066596d034403 Mon Sep 17 00:00:00 2001 From: Markus Makela Date: Thu, 10 Sep 2015 18:04:55 +0300 Subject: [PATCH] Fixed test build failures. --- log_manager/test/CMakeLists.txt | 6 +++--- query_classifier/test/CMakeLists.txt | 2 +- query_classifier/test/canonical_tests/CMakeLists.txt | 2 +- server/core/CMakeLists.txt | 2 +- server/core/test/CMakeLists.txt | 10 +++++----- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/log_manager/test/CMakeLists.txt b/log_manager/test/CMakeLists.txt index bbcfd5791..6018e746d 100644 --- a/log_manager/test/CMakeLists.txt +++ b/log_manager/test/CMakeLists.txt @@ -1,5 +1,5 @@ add_executable(testlog testlog.c) -add_executable(testorder testorder.c) -target_link_libraries(testlog pthread log_manager utils) -target_link_libraries(testorder pthread log_manager utils) +add_executable(testorder testorder.c ../../server/core/random_jkiss.c) +target_link_libraries(testlog pthread log_manager utils fullcore) +target_link_libraries(testorder pthread log_manager utils fullcore) add_test(NAME Internal-TestLogOrder COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/logorder.sh 200 0 1000 ${CMAKE_CURRENT_BINARY_DIR}/logorder.log) diff --git a/query_classifier/test/CMakeLists.txt b/query_classifier/test/CMakeLists.txt index 44b66e461..66c56eca7 100644 --- a/query_classifier/test/CMakeLists.txt +++ b/query_classifier/test/CMakeLists.txt @@ -10,5 +10,5 @@ endif() add_subdirectory(canonical_tests) add_executable(classify classify.c) -target_link_libraries(classify query_classifier fullcore) +target_link_libraries(classify query_classifier ${CURL_LIBRARIES} utils log_manager pthread ${EMBEDDED_LIB} ${PCRE_LINK_FLAGS} ssl aio rt crypt dl crypto inih z m stdc++ fullcore) add_test(Internal-TestQueryClassifier classify ${CMAKE_CURRENT_SOURCE_DIR}/input.sql ${CMAKE_CURRENT_SOURCE_DIR}/expected.sql) diff --git a/query_classifier/test/canonical_tests/CMakeLists.txt b/query_classifier/test/canonical_tests/CMakeLists.txt index 1dafc428e..925a3dd4f 100644 --- a/query_classifier/test/canonical_tests/CMakeLists.txt +++ b/query_classifier/test/canonical_tests/CMakeLists.txt @@ -7,7 +7,7 @@ else() file(COPY ${ERRMSG} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) endif() endif() -add_executable(canonizer canonizer.c) +add_executable(canonizer canonizer.c ${CMAKE_SOURCE_DIR}/server/core/random_jkiss.c) target_link_libraries(canonizer pthread query_classifier z dl ssl aio crypt crypto rt m ${EMBEDDED_LIB} fullcore stdc++) add_test(NAME Internal-TestCanonicalQuery COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/canontest.sh ${CMAKE_CURRENT_BINARY_DIR}/test.log diff --git a/server/core/CMakeLists.txt b/server/core/CMakeLists.txt index 5ad84ce59..0f0b00884 100644 --- a/server/core/CMakeLists.txt +++ b/server/core/CMakeLists.txt @@ -1,5 +1,5 @@ if(BUILD_TESTS OR BUILD_TOOLS) - add_library(fullcore STATIC adminusers.c atomic.c config.c buffer.c dbusers.c dcb.c filter.c gwbitmask.c gw_utils.c hashtable.c hint.c housekeeper.c load_utils.c memlog.c modutil.c monitor.c poll.c resultset.c secrets.c server.c service.c session.c spinlock.c thread.c users.c utils.c gwdirs.c externcmd.c random_jkiss.c) + add_library(fullcore STATIC random_jkiss.c adminusers.c atomic.c config.c buffer.c dbusers.c dcb.c filter.c gwbitmask.c gw_utils.c hashtable.c hint.c housekeeper.c load_utils.c memlog.c modutil.c monitor.c poll.c resultset.c secrets.c server.c service.c session.c spinlock.c thread.c users.c utils.c gwdirs.c externcmd.c) if(WITH_JEMALLOC) target_link_libraries(fullcore ${JEMALLOC_LIBRARIES}) elseif(WITH_TCMALLOC) diff --git a/server/core/test/CMakeLists.txt b/server/core/test/CMakeLists.txt index 2d32d55b1..0c9f4201f 100644 --- a/server/core/test/CMakeLists.txt +++ b/server/core/test/CMakeLists.txt @@ -1,10 +1,10 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${ERRMSG} ${CMAKE_CURRENT_BINARY_DIR}) add_executable(test_mysql_users test_mysql_users.c) -add_executable(test_hash testhash.c) -add_executable(test_hint testhint.c) -add_executable(test_spinlock testspinlock.c) +add_executable(test_hash testhash.c ../random_jkiss.c) +add_executable(test_hint testhint.c ../random_jkiss.c) +add_executable(test_spinlock testspinlock.c ../random_jkiss.c) add_executable(test_filter testfilter.c) -add_executable(test_buffer testbuffer.c) +add_executable(test_buffer testbuffer.c ../random_jkiss.c) add_executable(test_dcb testdcb.c) add_executable(test_modutil testmodutil.c) add_executable(test_poll testpoll.c) @@ -12,7 +12,7 @@ add_executable(test_service testservice.c) add_executable(test_server testserver.c) add_executable(test_users testusers.c) add_executable(test_adminusers testadminusers.c) -add_executable(testmemlog testmemlog.c) +add_executable(testmemlog testmemlog.c ../random_jkiss.c) add_executable(testfeedback testfeedback.c) target_link_libraries(test_mysql_users MySQLClient fullcore) target_link_libraries(test_hash fullcore log_manager)