aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/tests/datastore/logdatastore_test.cpp4
-rw-r--r--searchlib/src/tests/fef/featurenameparser/featurenameparser_test.cpp3
-rw-r--r--searchlib/src/tests/fef/table/table_test.cpp4
-rw-r--r--searchlib/src/tests/grouping/grouping_serialization_test.cpp4
-rw-r--r--searchlib/src/tests/indexmetainfo/indexmetainfo_test.cpp6
5 files changed, 11 insertions, 10 deletions
diff --git a/searchlib/src/tests/datastore/logdatastore_test.cpp b/searchlib/src/tests/datastore/logdatastore_test.cpp
index 7c558c2119d..b5591bc2eb0 100644
--- a/searchlib/src/tests/datastore/logdatastore_test.cpp
+++ b/searchlib/src/tests/datastore/logdatastore_test.cpp
@@ -3,7 +3,7 @@
#include <vespa/log/log.h>
LOG_SETUP("datastore_test");
-#include <vespa/vespalib/testkit/testapp.h>
+#include <vespa/vespalib/testkit/test_kit.h>
#include <vespa/searchlib/docstore/logdocumentstore.h>
#include <vespa/searchlib/docstore/chunkformats.h>
#include <vespa/searchlib/docstore/storebybucket.h>
@@ -303,7 +303,7 @@ TEST("testTruncatedIdxFile"){
{
// Files comes from the 'growing test'.
LogDataStore datastore(executor,
- vespalib::TestApp::GetSourceDirectory() + "bug-7257706", config,
+ TEST_PATH("bug-7257706"), config,
GrowStrategy(), TuneFileSummary(),
fileHeaderContext, tlSyncer, NULL);
EXPECT_EQUAL(354ul, datastore.lastSyncToken());
diff --git a/searchlib/src/tests/fef/featurenameparser/featurenameparser_test.cpp b/searchlib/src/tests/fef/featurenameparser/featurenameparser_test.cpp
index 5b4e3c96da5..bc04d1533f7 100644
--- a/searchlib/src/tests/fef/featurenameparser/featurenameparser_test.cpp
+++ b/searchlib/src/tests/fef/featurenameparser/featurenameparser_test.cpp
@@ -2,6 +2,7 @@
#include <vespa/fastos/fastos.h>
#include <vespa/log/log.h>
LOG_SETUP("featurenameparser_test");
+#include <vespa/vespalib/testkit/test_kit.h>
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/searchlib/fef/featurenameparser.h>
#include <vector>
@@ -144,7 +145,7 @@ Test::Main()
EXPECT_TRUE(testParse("foo( , , )", true, "foo", ParamList().add("").add("").add(""), ""));
EXPECT_TRUE(testParse("foo( \t , \n , \r , \f )", true, "foo", ParamList().add("").add("").add("").add(""), ""));
- testFile(vespalib::TestApp::GetSourceDirectory() + "parsetest.txt");
+ testFile(TEST_PATH("parsetest.txt"));
TEST_DONE();
}
diff --git a/searchlib/src/tests/fef/table/table_test.cpp b/searchlib/src/tests/fef/table/table_test.cpp
index 6835b6df5b0..7df91c6ee5d 100644
--- a/searchlib/src/tests/fef/table/table_test.cpp
+++ b/searchlib/src/tests/fef/table/table_test.cpp
@@ -34,8 +34,8 @@ public:
TableTest::TableTest() :
vespalib::TestApp(),
- _tables1Dir(vespalib::TestApp::GetSourceDirectory() + "tables1"),
- _tables2Dir(vespalib::TestApp::GetSourceDirectory() + "tables2")
+ _tables1Dir(TEST_PATH("tables1")),
+ _tables2Dir(TEST_PATH("tables2"))
{
}
diff --git a/searchlib/src/tests/grouping/grouping_serialization_test.cpp b/searchlib/src/tests/grouping/grouping_serialization_test.cpp
index a194ed7232b..1db13dca83d 100644
--- a/searchlib/src/tests/grouping/grouping_serialization_test.cpp
+++ b/searchlib/src/tests/grouping/grouping_serialization_test.cpp
@@ -19,7 +19,7 @@
#include <vespa/searchlib/expression/integerbucketresultnode.h>
#include <vespa/vespalib/objects/nboserializer.h>
#include <vespa/vespalib/objects/nbostream.h>
-#include <vespa/vespalib/testkit/testapp.h>
+#include <vespa/vespalib/testkit/test_kit.h>
#include <vespa/vespalib/util/stringfmt.h>
#include <fstream>
#include <vespa/log/log.h>
@@ -43,7 +43,7 @@ document::GlobalId getGlobalId(uint32_t docId) {
struct Fixture {
// Set WRITE_FILES to true to generate new expected serialization files.
const bool WRITE_FILES = false;
- const std::string file_path = vespalib::TestApp::GetSourceDirectory() + "../../test/files/";
+ const std::string file_path = TEST_PATH("../../test/files/");
std::string file_name;
std::ifstream file_stream;
diff --git a/searchlib/src/tests/indexmetainfo/indexmetainfo_test.cpp b/searchlib/src/tests/indexmetainfo/indexmetainfo_test.cpp
index 522f748c423..3bab4acceee 100644
--- a/searchlib/src/tests/indexmetainfo/indexmetainfo_test.cpp
+++ b/searchlib/src/tests/indexmetainfo/indexmetainfo_test.cpp
@@ -2,9 +2,9 @@
#include <vespa/fastos/fastos.h>
#include <vespa/log/log.h>
LOG_SETUP("indexmetainfo_test");
+#include <vespa/vespalib/testkit/test_kit.h>
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/searchlib/common/indexmetainfo.h>
-#include "../../../../vespalib/src/vespa/vespalib/testkit/testapp.h"
using search::IndexMetaInfo;
@@ -17,7 +17,7 @@ Test::Main()
{
TEST_INIT("indexmetainfo_test");
{ // load pregenerated file
- IndexMetaInfo info(vespalib::TestApp::GetSourceDirectory());
+ IndexMetaInfo info(TEST_PATH(""));
EXPECT_TRUE(info.load());
ASSERT_TRUE(info.snapshots().size() == 4);
EXPECT_TRUE(info.snapshots()[0].valid);
@@ -89,7 +89,7 @@ Test::Main()
EXPECT_TRUE(!info.load("file-not-present.txt"));
}
{ // load files with errors should fail
- IndexMetaInfo info(vespalib::TestApp::GetSourceDirectory());
+ IndexMetaInfo info(TEST_PATH(""));
EXPECT_TRUE(!info.load("bogus1.txt"));
EXPECT_TRUE(!info.load("bogus2.txt"));
EXPECT_TRUE(!info.load("bogus3.txt"));