summaryrefslogtreecommitdiff
path: root/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
commit273d98edf63c1e737c4f23f7397dc3d74ad513f0 (patch)
tree024c8686969ff52ed74c55140ff4cc49d4445d31 /cpp/src
parente4c45f313a91f6392e69cf7503796309e5e07463 (diff)
downloadqpid-python-273d98edf63c1e737c4f23f7397dc3d74ad513f0.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/qpid@1292937 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/tests/Makefile.am3
-rwxr-xr-xcpp/src/tests/ha_tests.py14
-rw-r--r--cpp/src/tests/test_env.sh.in1
3 files changed, 13 insertions, 5 deletions
diff --git a/cpp/src/tests/Makefile.am b/cpp/src/tests/Makefile.am
index 325019fb22..a7f3bc1fbd 100644
--- a/cpp/src/tests/Makefile.am
+++ b/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/cpp/src/tests/ha_tests.py b/cpp/src/tests/ha_tests.py
index dd3ed3847c..dfcec26d46 100755
--- a/cpp/src/tests/ha_tests.py
+++ b/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/cpp/src/tests/test_env.sh.in b/cpp/src/tests/test_env.sh.in
index 0cd658bd80..667a2f0a1b 100644
--- a/cpp/src/tests/test_env.sh.in
+++ b/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