diff options
author | Arnstein Ressem <aressem@gmail.com> | 2016-08-23 15:10:36 +0200 |
---|---|---|
committer | Vegard Sjonfjell <vegardsjo@gmail.com> | 2016-08-23 15:10:36 +0200 |
commit | 55e5a91901109161186e05d3a6e959e06958bbba (patch) | |
tree | f312bab2c60207ee305dbcfa047fcc4fa8fd2dc1 /searchlib/src/tests/indexmetainfo | |
parent | d337a29392fb752dc725e4aea5efa0cc0df5f17a (diff) |
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.
Diffstat (limited to 'searchlib/src/tests/indexmetainfo')
-rw-r--r-- | searchlib/src/tests/indexmetainfo/indexmetainfo_test.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/searchlib/src/tests/indexmetainfo/indexmetainfo_test.cpp b/searchlib/src/tests/indexmetainfo/indexmetainfo_test.cpp index 4bd40863fc2..522f748c423 100644 --- a/searchlib/src/tests/indexmetainfo/indexmetainfo_test.cpp +++ b/searchlib/src/tests/indexmetainfo/indexmetainfo_test.cpp @@ -4,6 +4,7 @@ LOG_SETUP("indexmetainfo_test"); #include <vespa/vespalib/testkit/testapp.h> #include <vespa/searchlib/common/indexmetainfo.h> +#include "../../../../vespalib/src/vespa/vespalib/testkit/testapp.h" using search::IndexMetaInfo; @@ -14,11 +15,9 @@ TEST_SETUP(Test) int Test::Main() { - const std::string srcDir = getenv("SOURCE_DIRECTORY") ? getenv("SOURCE_DIRECTORY") : "."; - TEST_INIT("indexmetainfo_test"); { // load pregenerated file - IndexMetaInfo info(srcDir); + IndexMetaInfo info(vespalib::TestApp::GetSourceDirectory()); EXPECT_TRUE(info.load()); ASSERT_TRUE(info.snapshots().size() == 4); EXPECT_TRUE(info.snapshots()[0].valid); @@ -90,7 +89,7 @@ Test::Main() EXPECT_TRUE(!info.load("file-not-present.txt")); } { // load files with errors should fail - IndexMetaInfo info(srcDir); + IndexMetaInfo info(vespalib::TestApp::GetSourceDirectory()); EXPECT_TRUE(!info.load("bogus1.txt")); EXPECT_TRUE(!info.load("bogus2.txt")); EXPECT_TRUE(!info.load("bogus3.txt")); |