summaryrefslogtreecommitdiff
path: root/libs/midi++2/test/MidnamTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/midi++2/test/MidnamTest.cpp')
-rw-r--r--libs/midi++2/test/MidnamTest.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/libs/midi++2/test/MidnamTest.cpp b/libs/midi++2/test/MidnamTest.cpp
index 03d0682c8d..4a0d85801e 100644
--- a/libs/midi++2/test/MidnamTest.cpp
+++ b/libs/midi++2/test/MidnamTest.cpp
@@ -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