summaryrefslogtreecommitdiff
path: root/cpp/src/tests/stop_broker.ps1
diff options
context:
space:
mode:
authorStephen D. Huston <shuston@apache.org>2009-10-03 22:34:40 +0000
committerStephen D. Huston <shuston@apache.org>2009-10-03 22:34:40 +0000
commit0bbf4e6ea41fa075b0bfd046789967c8a7f2f74a (patch)
tree3ac588eaafad755bf39931a9165ef9c7169a2c31 /cpp/src/tests/stop_broker.ps1
parentf81547080ee98c69f6f505a388b504644f7197a8 (diff)
downloadqpid-python-0bbf4e6ea41fa075b0bfd046789967c8a7f2f74a.tar.gz
Look for qpidd.exe in various places, not just Debug
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@821437 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/stop_broker.ps1')
-rw-r--r--cpp/src/tests/stop_broker.ps117
1 files changed, 16 insertions, 1 deletions
diff --git a/cpp/src/tests/stop_broker.ps1 b/cpp/src/tests/stop_broker.ps1
index 165c7a63b0..4fdeb26e2b 100644
--- a/cpp/src/tests/stop_broker.ps1
+++ b/cpp/src/tests/stop_broker.ps1
@@ -21,8 +21,23 @@
Get-Content -path qpidd.port -totalCount 1 | Set-Variable -name qpid_port
Remove-Item qpidd.port
+# Test runs from the tests directory but the broker executable is one level
+# up, and most likely in a subdirectory from there based on what build type.
+# Look around for it before trying to start it.
+$subs = "Debug","Release","MinSizeRel","RelWithDebInfo"
+foreach ($sub in $subs) {
+ $prog = "..\$sub\qpidd.exe"
+ if (Test-Path $prog) {
+ break
+ }
+}
+if (!(Test-Path $prog)) {
+ "Cannot locate qpidd.exe"
+ exit 1
+}
+
# Piping the output makes the script wait for qpidd to finish.
-..\Debug\qpidd --quit --port $qpid_port | Write-Output
+Invoke-Expression "$prog --quit --port $qpid_port" | Write-Output
$stopped = $?
# Check qpidd.log.