From 4d5e7ba350d4076296e1ca3fab39dbc36a640d50 Mon Sep 17 00:00:00 2001 From: "Stephen D. Huston" Date: Thu, 15 Oct 2009 00:38:18 +0000 Subject: 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 --- cpp/src/tests/topictest.ps1 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'cpp/src/tests/topictest.ps1') 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" } -- cgit v1.2.1