fix issue with solo-in-place
[ardour.git] / libs / midi++2 / test / MidnamTest.cpp
index 1202a47d94dc53de1a3180e3f5976379c7a6deba..3d0beeb72f5b25e8dcda2f9ff733016866177a27 100644 (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
@@ -171,7 +172,7 @@ MidnamTest::yamaha_PSRS900_patchfile_test()
     }
 }
 
-void 
+void
 MidnamTest::load_all_midnams_test ()
 {
     vector<std::string> result;
@@ -183,7 +184,7 @@ MidnamTest::load_all_midnams_test ()
     cout << "Loading " << result.size() << " MIDI patches from " << test_search_path ().to_string () << endl;
 
     for (vector<std::string>::iterator i = result.begin(); i != result.end(); ++i) {
-        cout << "Processing file " << *i << endl;
+        cout << "Processing file " << Glib::path_get_basename(*i) << endl;
         boost::shared_ptr<MIDINameDocument> document(new MIDINameDocument(*i));
 
         XMLTree xmldoc(*i);