From 0bbf4e6ea41fa075b0bfd046789967c8a7f2f74a Mon Sep 17 00:00:00 2001 From: "Stephen D. Huston" Date: Sat, 3 Oct 2009 22:34:40 +0000 Subject: 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 --- cpp/src/tests/stop_broker.ps1 | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'cpp/src/tests/stop_broker.ps1') 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. -- cgit v1.2.1