diff options
Diffstat (limited to 'searchcore/src')
5 files changed, 15 insertions, 13 deletions
diff --git a/searchcore/src/tests/applyattrupdates/applyattrupdates.cpp b/searchcore/src/tests/applyattrupdates/applyattrupdates.cpp index 8cb671f585e..959c8250e8d 100644 --- a/searchcore/src/tests/applyattrupdates/applyattrupdates.cpp +++ b/searchcore/src/tests/applyattrupdates/applyattrupdates.cpp @@ -317,7 +317,7 @@ Test::requireThatWeightedSetAttributesAreUpdated() } Test::Test() - : _repo(readDocumenttypesConfig(vespalib::TestApp::GetSourceDirectory() + "doctypes.cfg")), + : _repo(readDocumenttypesConfig(TEST_PATH("doctypes.cfg"))), _docType(_repo.getDocumentType("testdoc")) { } diff --git a/searchcore/src/tests/proton/docsummary/docsummary.cpp b/searchcore/src/tests/proton/docsummary/docsummary.cpp index 5aa138121f9..dbd4839732d 100644 --- a/searchcore/src/tests/proton/docsummary/docsummary.cpp +++ b/searchcore/src/tests/proton/docsummary/docsummary.cpp @@ -156,7 +156,7 @@ public: _queryLimiter(), _clock(), _dummy(), - _spec(vespalib::TestApp::GetSourceDirectory()), + _spec(TEST_PATH("")), _configMgr(_spec, getDocTypeName()), _documenttypesConfig(new DocumenttypesConfig()), _repo(repo), @@ -1250,11 +1250,11 @@ Test::Test() { std::string cfgId("summary"); _summaryCfg = config::ConfigGetter<vespa::config::search::SummaryConfig>::getConfig( - cfgId, config::FileSpec(vespalib::TestApp::GetSourceDirectory() + "summary.cfg")); + cfgId, config::FileSpec(TEST_PATH("summary.cfg"))); _resultCfg.ReadConfig(*_summaryCfg, cfgId.c_str()); std::string mapCfgId("summarymap"); std::unique_ptr<vespa::config::search::SummarymapConfig> mapCfg = config::ConfigGetter<vespa::config::search::SummarymapConfig>::getConfig( - mapCfgId, config::FileSpec(vespalib::TestApp::GetSourceDirectory() + "summarymap.cfg")); + mapCfgId, config::FileSpec(TEST_PATH("summarymap.cfg"))); for (size_t i = 0; i < mapCfg->override.size(); ++i) { const vespa::config::search::SummarymapConfig::Override & o = mapCfg->override[i]; if (o.command == "dynamicteaser") { @@ -1271,6 +1271,7 @@ Test::Test() } + int Test::Main() { diff --git a/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp b/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp index 384de9f207e..a5e7aec421b 100644 --- a/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp +++ b/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp @@ -20,7 +20,7 @@ LOG_SETUP("document_subdbs_test"); #include <vespa/searchlib/index/docbuilder.h> #include <vespa/vespalib/io/fileutil.h> #include <vespa/vespalib/test/insertion_operators.h> -#include <vespa/vespalib/testkit/testapp.h> +#include <vespa/vespalib/testkit/test_kit.h> #include <iostream> @@ -57,10 +57,11 @@ const std::string SUB_NAME = "subdb"; const std::string BASE_DIR = "basedir"; const SerialNum CFG_SERIAL = 5; -struct ConfigDir1 { static vespalib::string dir() { return vespalib::TestApp::GetSourceDirectory() + "cfg1"; } }; -struct ConfigDir2 { static vespalib::string dir() { return vespalib::TestApp::GetSourceDirectory() + "cfg2"; } }; -struct ConfigDir3 { static vespalib::string dir() { return vespalib::TestApp::GetSourceDirectory() + "cfg3"; } }; -struct ConfigDir4 { static vespalib::string dir() { return vespalib::TestApp::GetSourceDirectory() + "cfg4"; } }; +struct ConfigDir1 { static vespalib::string dir() { return TEST_PATH("cfg1"); } }; +struct ConfigDir2 { static vespalib::string dir() { return TEST_PATH("cfg2"); } }; +struct ConfigDir3 { static vespalib::string dir() { return TEST_PATH("cfg3"); } }; +struct ConfigDir4 { static vespalib::string dir() { return TEST_PATH("cfg4") + ; } }; struct MySubDBOwner : public IDocumentSubDB::IOwner { diff --git a/searchcore/src/tests/proton/documentdb/documentdb_test.cpp b/searchcore/src/tests/proton/documentdb/documentdb_test.cpp index 699da256c8e..e95e8adc4c8 100644 --- a/searchcore/src/tests/proton/documentdb/documentdb_test.cpp +++ b/searchcore/src/tests/proton/documentdb/documentdb_test.cpp @@ -20,7 +20,7 @@ LOG_SETUP("documentdb_test"); #include <vespa/searchlib/index/dummyfileheadercontext.h> #include <vespa/searchlib/transactionlog/translogserver.h> #include <tests/proton/common/dummydbowner.h> -#include <vespa/vespalib/testkit/testapp.h> +#include <vespa/vespalib/testkit/test_kit.h> using document::DocumentType; using document::DocumentTypeRepo; @@ -73,7 +73,7 @@ Fixture::Fixture() DocumentType docType("typea", 0); DocumentTypeRepo::SP repo(new DocumentTypeRepo(docType)); TuneFileDocumentDB::SP tuneFileDocumentDB(new TuneFileDocumentDB); - config::DirSpec spec(vespalib::TestApp::GetSourceDirectory() + "cfg"); + config::DirSpec spec(TEST_PATH("cfg")); DocumentDBConfigHelper mgr(spec, "typea"); BootstrapConfig::SP b(new BootstrapConfig(1, diff --git a/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp b/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp index e61e3763094..16cad6e07bd 100644 --- a/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp +++ b/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp @@ -7,7 +7,7 @@ LOG_SETUP("fileconfigmanager_test"); #include <vespa/searchcore/proton/server/fileconfigmanager.h> #include <vespa/searchcore/proton/test/documentdb_config_builder.h> #include <vespa/vespalib/io/fileutil.h> -#include <vespa/vespalib/testkit/testapp.h> +#include <vespa/vespalib/testkit/test_kit.h> #include <vespa/searchcore/proton/common/schemautil.h> using namespace config; @@ -53,7 +53,7 @@ getSchema(int step) DocumentDBConfig::SP makeBaseConfigSnapshot() { - config::DirSpec spec(vespalib::TestApp::GetSourceDirectory() + "cfg"); + config::DirSpec spec(TEST_PATH("cfg")); ConfigKeySet extraKeySet; extraKeySet.add<MycfgConfig>(""); DBCM dbcm(spec, "test", extraKeySet); |