summaryrefslogtreecommitdiff
path: root/cpp/src/tests/topictest.ps1
diff options
context:
space:
mode:
authorStephen D. Huston <shuston@apache.org>2009-10-15 00:38:18 +0000
committerStephen D. Huston <shuston@apache.org>2009-10-15 00:38:18 +0000
commit4d5e7ba350d4076296e1ca3fab39dbc36a640d50 (patch)
treec9a40fdb358dee54455338fa61811ec98fea3f93 /cpp/src/tests/topictest.ps1
parent0aca464453c5c4ed3fb0f536445a998ca8a9c7c8 (diff)
downloadqpid-python-4d5e7ba350d4076296e1ca3fab39dbc36a640d50.tar.gz
Improved test output capturing in automated tests; correctly get exe process exit codes
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@825358 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/topictest.ps1')
-rw-r--r--cpp/src/tests/topictest.ps19
1 files changed, 6 insertions, 3 deletions
diff --git a/cpp/src/tests/topictest.ps1 b/cpp/src/tests/topictest.ps1
index 58ae50c67c..0d22cea657 100644
--- a/cpp/src/tests/topictest.ps1
+++ b/cpp/src/tests/topictest.ps1
@@ -18,6 +18,7 @@
#
# Run the C++ topic test
+$srcdir = Split-Path $myInvocation.InvocationName
# Parameters with default values: s (subscribers) m (messages) b (batches)
# h (host) t (false; use transactions)
@@ -36,21 +37,23 @@ if ($t) {
$transactional = "--transactional --durable"
}
+# Find which subdir the exes are in
+. $srcdir\find_prog.ps1 .\topic_listener.exe
+
function subscribe {
param ([int]$num)
"Start subscriber $num"
$LOG = "subscriber_$num.log"
- $cmdline = "$env:OUTDIR\topic_listener $transactional > $LOG 2>&1
+ $cmdline = ".\$sub\topic_listener $transactional > $LOG 2>&1
if (`$LastExitCode -ne 0) { Remove-Item $LOG }"
$cmdblock = $executioncontext.invokecommand.NewScriptBlock($cmdline)
. $srcdir\background.ps1 $cmdblock
}
function publish {
- Invoke-Expression "$env:OUTDIR\topic_publisher --messages $messages --batches $batches --subscribers $subscribers $host $transactional" 2>&1
+ Invoke-Expression ".\$sub\topic_publisher --messages $messages --batches $batches --subscribers $subscribers $host $transactional" 2>&1
}
-$srcdir = Split-Path $MyInvocation.MyCommand.Path
if ($broker.length) {
$broker = "-h$broker"
}