7 #include "fwTest/Exception.hpp" 8 #include "fwTest/Data.hpp" 10 #include <boost/filesystem/operations.hpp> 19 const std::string Data::s_TEST_DATA_DIR_ENV_VAR(
"FWTEST_DATA_DIR");
21 ::boost::filesystem::path Data::dir()
23 char * val = std::getenv(s_TEST_DATA_DIR_ENV_VAR.c_str());
26 std::stringstream msg;
27 msg <<
"The '" << s_TEST_DATA_DIR_ENV_VAR
28 <<
"' environment variable is not set.";
32 ::boost::filesystem::path datadir(val);
34 if (!::boost::filesystem::exists(datadir))
36 std::stringstream msg;
37 msg <<
"The path'" << datadir
38 <<
"' doesn't seem to exist.";