From 8e8f8d92c2e49804af80cd42145bea728b9c7fd0 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 13 Sep 2015 15:30:00 +0200 Subject: allow to run unit-test under wine from srcdir. --- libs/pbd/test/test_common.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'libs/pbd/test') diff --git a/libs/pbd/test/test_common.cc b/libs/pbd/test/test_common.cc index f9bc42c027..12bab8baa8 100644 --- a/libs/pbd/test/test_common.cc +++ b/libs/pbd/test/test_common.cc @@ -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 -- cgit v1.2.3