summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/start_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
commit282ab14e28048c03677a5d7e17695db4f8e39804 (patch)
tree29805096af1136db5b6aad9501e917b99224278b /qpid/cpp/src/tests/start_broker.ps1
parent2df0b393db42d098f590f6b00fb96b0c15b1f6f9 (diff)
downloadqpid-python-282ab14e28048c03677a5d7e17695db4f8e39804.tar.gz
Look for qpidd.exe in various places, not just Debug
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@821437 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/start_broker.ps1')
-rw-r--r--qpid/cpp/src/tests/start_broker.ps121
1 files changed, 19 insertions, 2 deletions
diff --git a/qpid/cpp/src/tests/start_broker.ps1 b/qpid/cpp/src/tests/start_broker.ps1
index f2aa20439a..9263262b9f 100644
--- a/qpid/cpp/src/tests/start_broker.ps1
+++ b/qpid/cpp/src/tests/start_broker.ps1
@@ -28,9 +28,26 @@ function Get-ScriptPath
if (Test-Path qpidd.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
+}
+$cmdline = "$prog --auth=no --no-module-dir --port=0 --log-to-file qpidd.log $args | foreach { set-content qpidd.port `$_ }"
+$cmdblock = $executioncontext.invokecommand.NewScriptBlock($cmdline)
$srcdir = Get-ScriptPath
-. $srcdir\background.ps1 {
- ..\Debug\qpidd --auth=no --no-module-dir --port=0 --log-to-file qpidd.log $args | foreach { set-content qpidd.port $_ } }
+. $srcdir\background.ps1 $cmdblock
+
$wait_time = 0
while (!(Test-Path qpidd.port) -and ($wait_time -lt 10)) {
Start-Sleep 2