13
0

allow to run unit-test under wine from srcdir.

This commit is contained in:
Robin Gareus 2015-09-13 15:30:00 +02:00
parent aabc5108f3
commit 8e8f8d92c2
4 changed files with 24 additions and 20 deletions

View File

@ -134,11 +134,12 @@ PBD::Searchpath
test_search_path ()
{
#ifdef PLATFORM_WINDOWS
std::string wsp(windows_package_directory_path());
return Glib::build_filename (wsp, "ardour_testdata");
#else
return Glib::getenv("ARDOUR_TEST_PATH");
if (!getenv("ARDOUR_TEST_PATH")) {
std::string wsp(windows_package_directory_path());
return Glib::build_filename (wsp, "ardour_testdata");
}
#endif
return Glib::getenv("ARDOUR_TEST_PATH");
}
std::string

View File

@ -25,11 +25,12 @@ PBD::Searchpath
test_search_path ()
{
#ifdef PLATFORM_WINDOWS
string wsp(g_win32_get_package_installation_directory_of_module(NULL));
return Glib::build_filename (wsp, "evoral_testdata");
#else
return Glib::getenv("EVORAL_TEST_PATH");
if (!getenv("EVORAL_TEST_PATH")) {
string wsp(g_win32_get_package_installation_directory_of_module(NULL));
return Glib::build_filename (wsp, "evoral_testdata");
}
#endif
return Glib::getenv("EVORAL_TEST_PATH");
}
void

View File

@ -18,15 +18,16 @@ PBD::Searchpath
test_search_path ()
{
#ifdef PLATFORM_WINDOWS
std::vector<std::string> path_tok;
path_tok.push_back (g_win32_get_package_installation_directory_of_module(NULL));
path_tok.push_back ("share");
path_tok.push_back ("ardour3");
path_tok.push_back ("patchfiles");
return Glib::build_filename (path_tok);
#else
return Glib::getenv("MIDIPP_TEST_PATH");
if (!getenv("MIDIPP_TEST_PATH")) {
std::vector<std::string> path_tok;
path_tok.push_back (g_win32_get_package_installation_directory_of_module(NULL));
path_tok.push_back ("share");
path_tok.push_back ("ardour3");
path_tok.push_back ("patchfiles");
return Glib::build_filename (path_tok);
}
#endif
return Glib::getenv("MIDIPP_TEST_PATH");
}
void

View File

@ -36,11 +36,12 @@ PBD::Searchpath
test_search_path ()
{
#ifdef PLATFORM_WINDOWS
std::string wsp(g_win32_get_package_installation_directory_of_module(NULL));
return Glib::build_filename (wsp, "pbd_testdata");
#else
return Glib::getenv("PBD_TEST_PATH");
if (!getenv("PBD_TEST_PATH")) {
std::string wsp(g_win32_get_package_installation_directory_of_module(NULL));
return Glib::build_filename (wsp, "pbd_testdata");
}
#endif
return Glib::getenv("PBD_TEST_PATH");
}
std::string