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 /configutil/src | |
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 'configutil/src')
-rw-r--r-- | configutil/src/tests/model_inspect/model_inspect_test.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/configutil/src/tests/model_inspect/model_inspect_test.cpp b/configutil/src/tests/model_inspect/model_inspect_test.cpp index 283d1f0c4f2..a2d07fcaedf 100644 --- a/configutil/src/tests/model_inspect/model_inspect_test.cpp +++ b/configutil/src/tests/model_inspect/model_inspect_test.cpp @@ -11,12 +11,12 @@ public: std::stringstream stream; ModelInspect model; - Model() : uri("file:model.cfg"), flags(), stream(), + Model() : uri(configUri("file", "model.cfg")), flags(), stream(), model(flags, uri, stream) { }; Model(ModelInspect::Flags _flags) - : uri("file:model.cfg"), flags(_flags), stream(), + : uri(configUri("file", "model.cfg")), flags(_flags), stream(), model(flags, uri, stream) { }; @@ -30,6 +30,12 @@ public: ~Model() { }; + + static config::ConfigUri configUri(const std::string &type, const std::string &name) + { + return config::ConfigUri(type + ":" + + vespalib::TestApp::GetSourceDirectory() + "/" + name); + } }; class MakeUriFlags : public ModelInspect::Flags { @@ -63,7 +69,7 @@ public: _getIndexOf; ModelDummy(std::stringstream &stream) : ModelInspect(ModelInspect::Flags(), - config::ConfigUri("file:model.cfg"), + config::ConfigUri(Model::configUri("file", "model.cfg")), stream) { _yamlDump = _listHosts = |