From e0c7ce135bf77cd98ecdd25b668fbc7140e82b20 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Wed, 25 Feb 2015 17:17:15 +0000 Subject: QPID-6414: Skip HA tests if qpid-ha or qpid-config tools are not available. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1662275 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/tests/ha_tests.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'qpid/cpp/src/tests/ha_tests.py') diff --git a/qpid/cpp/src/tests/ha_tests.py b/qpid/cpp/src/tests/ha_tests.py index a43b939ee3..1d475ebfe7 100755 --- a/qpid/cpp/src/tests/ha_tests.py +++ b/qpid/cpp/src/tests/ha_tests.py @@ -1631,12 +1631,14 @@ class TransactionTests(HaBrokerTest): "*.tx.*"]).assert_exit_ok() if __name__ == "__main__": - outdir = "ha_tests.tmp" - shutil.rmtree(outdir, True) - qpid_ha = os.getenv("QPID_HA_EXEC") - if qpid_ha and os.path.exists(qpid_ha): + qpid_ha_exec = os.getenv("QPID_HA_EXEC") + if qpid_ha_exec and os.path.isfile(qpid_ha_exec): + outdir = "ha_tests.tmp" + shutil.rmtree(outdir, True) os.execvp("qpid-python-test", - ["qpid-python-test", "-m", "ha_tests", "-DOUTDIR=%s"%outdir] + ["qpid-python-test", "-m", "ha_tests", "-DOUTDIR=%s"%outdir] + sys.argv[1:]) else: - print "Skipping ha_tests, %s not available"%(qpid_ha) + print "Skipping ha_tests, qpid-ha not available" + + -- cgit v1.2.1