From 55e5a91901109161186e05d3a6e959e06958bbba Mon Sep 17 00:00:00 2001 From: Arnstein Ressem Date: Tue, 23 Aug 2016 15:10:36 +0200 Subject: Aressem/cmake more out of source tests (#441) * vespalib tests run out of source. * staging_vespalib run tests out of source. * fastos tests run out of source. * Fixed storage tests out of source. * Fixed some of the config tests. * config* tests run out of source. * document_* tests run out of source. * documentapi_ tests run out of source. * Fixed fsa out of source tests. * Fix jrt_test out of source. * More tests run out of source. * Fix some slobrok and messagebus tests. * More fixes for out of source tests. * Done with first pass of regular tests out of source. * Only use SOURCE_DIRECTORY in a limited set of places. * Fix some remaining tests. * Some cleanups. * No need for extra slash. --- staging_vespalib/src/tests/fileheader/fileheader_test.cpp | 3 ++- staging_vespalib/src/tests/util/process_memory_stats/CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'staging_vespalib') diff --git a/staging_vespalib/src/tests/fileheader/fileheader_test.cpp b/staging_vespalib/src/tests/fileheader/fileheader_test.cpp index 2aaeeea58a8..cd3dc5271ed 100644 --- a/staging_vespalib/src/tests/fileheader/fileheader_test.cpp +++ b/staging_vespalib/src/tests/fileheader/fileheader_test.cpp @@ -593,7 +593,8 @@ void Test::testLayout() { FastOS_File file; - ASSERT_TRUE(file.OpenReadOnly("fileheader.dat")); + const std::string fileName = vespalib::TestApp::GetSourceDirectory() + "fileheader.dat"; + ASSERT_TRUE(file.OpenReadOnly(fileName.c_str())); FileHeader header; uint32_t len = header.readFile(file); diff --git a/staging_vespalib/src/tests/util/process_memory_stats/CMakeLists.txt b/staging_vespalib/src/tests/util/process_memory_stats/CMakeLists.txt index bc5bb9194ff..aa1e2e0e2b6 100644 --- a/staging_vespalib/src/tests/util/process_memory_stats/CMakeLists.txt +++ b/staging_vespalib/src/tests/util/process_memory_stats/CMakeLists.txt @@ -5,4 +5,4 @@ vespa_add_executable(staging_vespalib_process_memory_stats_test_app TEST DEPENDS staging_vespalib ) -vespa_add_test(NAME staging_vespalib_process_memory_stats_test_app COMMAND sh process_memory_stats_test.sh) +vespa_add_test(NAME staging_vespalib_process_memory_stats_test_app COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/process_memory_stats_test.sh) -- cgit v1.2.3