summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/env.py.in
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/cpp/src/tests/env.py.in')
-rw-r--r--qpid/cpp/src/tests/env.py.in36
1 files changed, 26 insertions, 10 deletions
diff --git a/qpid/cpp/src/tests/env.py.in b/qpid/cpp/src/tests/env.py.in
index c2dfbcb86c..29b8c8739c 100644
--- a/qpid/cpp/src/tests/env.py.in
+++ b/qpid/cpp/src/tests/env.py.in
@@ -21,6 +21,10 @@ from __future__ import print_function
from plano import *
+import platform as _platform
+
+WINDOWS = _platform.system() == "Windows"
+
def _export(name, value):
globals()[name] = value
@@ -33,6 +37,8 @@ def _export_module(name, path):
if exists(path):
_export(name, path)
+_cmake_build_type = "RelWithDebInfo" # XXX
+
# Variables substituted by cmake
_export("BUILD_DIR", normalize_path("@CMAKE_BINARY_DIR@"))
@@ -59,11 +65,16 @@ ENV["PYTHONPATH"] = PATH_VAR_SEP.join(_python_path)
# Path
+_build_src_dir = join(BUILD_DIR, "src")
+_build_tests_dir = join(BUILD_DIR, "src", "tests")
+
+if WINDOWS:
+ _build_src_dir = join(_build_src_dir, _cmake_build_type)
+ _build_tests_dir = join(_build_tests_dir, _cmake_build_type)
+
_path = [
- join(BUILD_DIR, "src"),
- join(BUILD_DIR, "src", "RelWithDebInfo"),
- join(BUILD_DIR, "src", "tests"),
- join(BUILD_DIR, "src", "tests", "RelWithDebInfo"),
+ _build_src_dir,
+ _build_tests_dir,
join(BUILD_DIR, "management", "python", "bin"),
]
@@ -74,14 +85,19 @@ ENV["PATH"] = PATH_VAR_SEP.join(_path)
# Modules
-_export_module("HA_LIB", join(BUILD_DIR, "src", "ha.so"))
-_export_module("XML_LIB", join(BUILD_DIR, "src", "xml.so"))
-_export_module("AMQP_LIB", join(BUILD_DIR, "src", "amqp.so"))
-_export_module("TEST_STORE_LIB", join(BUILD_DIR, "src", "tests", "test_store.so"))
-_export_module("STORE_LIB", join(BUILD_DIR, "src", "linearstore.so"))
+_module_prefix = join(BUILD_DIR, "src")
+
+if WINDOWS:
+ _module_prefix = join(_module_prefix, _cmake_build_type)
+
+_export_module("HA_LIB", join(_module_prefix, "ha@CMAKE_SHARED_LIBRARY_SUFFIX@"))
+_export_module("XML_LIB", join(_module_prefix, "xml@CMAKE_SHARED_LIBRARY_SUFFIX@"))
+_export_module("AMQP_LIB", join(_module_prefix, "amqp@CMAKE_SHARED_LIBRARY_SUFFIX@"))
+_export_module("TEST_STORE_LIB", join(_module_prefix, "tests", "test_store@CMAKE_SHARED_LIBRARY_SUFFIX@"))
+_export_module("STORE_LIB", join(_module_prefix, "linearstore@CMAKE_SHARED_LIBRARY_SUFFIX@"))
if STORE_LIB is None:
- _export_module("STORE_LIB", join(BUILD_DIR, "src", "legacystore.so"))
+ _export_module("STORE_LIB", join(_module_prefix, "legacystore@CMAKE_SHARED_LIBRARY_SUFFIX@"))
# Summarize