summaryrefslogtreecommitdiff
path: root/qpid/cpp/src
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2012-02-23 20:17:34 +0000
committerAlan Conway <aconway@apache.org>2012-02-23 20:17:34 +0000
commit1b4a67ccc4b501b2b7872881609ee9f0d8c2e3eb (patch)
tree0e06c76f9da1e93f260e03903d66ddd743b73303 /qpid/cpp/src
parent9b7a339fad8ae24256c959eabd8bacfe862ba4b3 (diff)
downloadqpid-python-1b4a67ccc4b501b2b7872881609ee9f0d8c2e3eb.tar.gz
NO-JIRA: Fix broken distcheck - ha_tests.py not being skipped.
ha_tests.py depends on the python tools directory being available. Modified it to skip the test if it is not (e.g. when running make distcheck) git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1292937 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r--qpid/cpp/src/tests/Makefile.am3
-rwxr-xr-xqpid/cpp/src/tests/ha_tests.py14
-rw-r--r--qpid/cpp/src/tests/test_env.sh.in1
3 files changed, 13 insertions, 5 deletions
diff --git a/qpid/cpp/src/tests/Makefile.am b/qpid/cpp/src/tests/Makefile.am
index 325019fb22..a7f3bc1fbd 100644
--- a/qpid/cpp/src/tests/Makefile.am
+++ b/qpid/cpp/src/tests/Makefile.am
@@ -351,7 +351,8 @@ EXTRA_DIST += \
topictest.ps1 \
run_queue_flow_limit_tests \
run_msg_group_tests \
- ipv6_test
+ ipv6_test \
+ ha_tests.py
check_LTLIBRARIES += libdlclose_noop.la
libdlclose_noop_la_LDFLAGS = -module -rpath $(abs_builddir)
diff --git a/qpid/cpp/src/tests/ha_tests.py b/qpid/cpp/src/tests/ha_tests.py
index dd3ed3847c..dfcec26d46 100755
--- a/qpid/cpp/src/tests/ha_tests.py
+++ b/qpid/cpp/src/tests/ha_tests.py
@@ -39,15 +39,15 @@ class HaBroker(Broker):
Broker.__init__(self, test, args, **kwargs)
def promote(self):
- assert os.system("qpid-ha-tool --promote %s"%(self.host_port())) == 0
+ assert os.system("$QPID_HA_TOOL_EXEC --promote %s"%(self.host_port())) == 0
def set_client_url(self, url):
assert os.system(
- "qpid-ha-tool --client-addresses=%s %s"%(url,self.host_port())) == 0
+ "$QPID_HA_TOOL_EXEC --client-addresses=%s %s"%(url,self.host_port())) == 0
def set_broker_url(self, url):
assert os.system(
- "qpid-ha-tool --broker-addresses=%s %s"%(url, self.host_port())) == 0
+ "$QPID_HA_TOOL_EXEC --broker-addresses=%s %s"%(url, self.host_port())) == 0
def set_broker_urls(brokers):
url = ",".join([b.host_port() for b in brokers])
@@ -475,4 +475,10 @@ class LongTests(BrokerTest):
if __name__ == "__main__":
shutil.rmtree("brokertest.tmp", True)
- os.execvp("qpid-python-test", ["qpid-python-test", "-m", "ha_tests"] + sys.argv[1:])
+ qpid_ha_tool = os.getenv("QPID_HA_TOOL_EXEC")
+ if qpid_ha_tool and os.path.exists(qpid_ha_tool):
+ os.execvp("qpid-python-test",
+ ["qpid-python-test", "-m", "ha_tests"] + sys.argv[1:])
+ else:
+ print "Skipping ha_tests, qpid_ha_tool not available"
+
diff --git a/qpid/cpp/src/tests/test_env.sh.in b/qpid/cpp/src/tests/test_env.sh.in
index 0cd658bd80..667a2f0a1b 100644
--- a/qpid/cpp/src/tests/test_env.sh.in
+++ b/qpid/cpp/src/tests/test_env.sh.in
@@ -44,6 +44,7 @@ export PYTHONPATH=$srcdir:$PYTHON_DIR:$PYTHON_COMMANDS:$QPID_TESTS_PY:$QMF_LIB:$
export QPID_CONFIG_EXEC=$PYTHON_COMMANDS/qpid-config
export QPID_ROUTE_EXEC=$PYTHON_COMMANDS/qpid-route
export QPID_CLUSTER_EXEC=$PYTHON_COMMANDS/qpid-cluster
+export QPID_HA_TOOL_EXEC=$PYTHON_COMMANDS/qpid-ha-tool
# Executables
export QPIDD_EXEC=$top_builddir/src/qpidd