You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by sh...@apache.org on 2010/03/05 01:09:25 UTC

svn commit: r919240 - in /qpid/trunk/qpid/cpp/src/tests: quick_topictest.ps1 topictest.ps1

Author: shuston
Date: Fri Mar  5 00:09:25 2010
New Revision: 919240

URL: http://svn.apache.org/viewvc?rev=919240&view=rev
Log:
Fix to run topictest correctly on Windows.

Modified:
    qpid/trunk/qpid/cpp/src/tests/quick_topictest.ps1
    qpid/trunk/qpid/cpp/src/tests/topictest.ps1

Modified: qpid/trunk/qpid/cpp/src/tests/quick_topictest.ps1
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/quick_topictest.ps1?rev=919240&r1=919239&r2=919240&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/quick_topictest.ps1 (original)
+++ qpid/trunk/qpid/cpp/src/tests/quick_topictest.ps1 Fri Mar  5 00:09:25 2010
@@ -20,11 +20,11 @@
 # Quick and quiet topic test for make check.
 [string]$me = $myInvocation.InvocationName
 $srcdir = Split-Path $me
-& "$srcdir\topictest.ps1" -subscribers 2 -messages 2 -batches 1 > topictest.log 2>&1
+Invoke-Expression "$srcdir\topictest.ps1 -subscribers 2 -messages 2 -batches 1" > topictest.log 2>&1
 if (!$?) {
     "$me FAILED:"
     cat topictest.log
-    exit $LastExitCode
+    exit 1
 }
 Remove-Item topictest.log
 exit 0

Modified: qpid/trunk/qpid/cpp/src/tests/topictest.ps1
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/topictest.ps1?rev=919240&r1=919239&r2=919240&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/topictest.ps1 (original)
+++ qpid/trunk/qpid/cpp/src/tests/topictest.ps1 Fri Mar  5 00:09:25 2010
@@ -17,19 +17,21 @@
 # under the License.
 #
 
-# 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)
 param (
   [int]$subscribers = 10,
-  [int]$messages = 2000,
+  [int]$message_count = 2000,
   [int]$batches = 10,
   [string]$broker,
   [switch] $t           # transactional
 )
 
+# Run the C++ topic test
+[string]$me = $myInvocation.InvocationName
+$srcdir = Split-Path $me
+#$srcdir = Split-Path $myInvocation.InvocationName
+
 # Clean up old log files
 Get-Item subscriber_*.log | Remove-Item
 
@@ -41,7 +43,7 @@
 . $srcdir\find_prog.ps1 .\topic_listener.exe
 
 function subscribe {
-    param ([int]$num)
+    param ([int]$num, [string]$sub)
     "Start subscriber $num"
     $LOG = "subscriber_$num.log"
     $cmdline = ".\$sub\topic_listener $transactional > $LOG 2>&1
@@ -51,7 +53,8 @@
 }
 
 function publish {
-    Invoke-Expression ".\$sub\topic_publisher --messages $messages --batches $batches --subscribers $subscribers $host $transactional" 2>&1
+    param ([string]$sub)
+    Invoke-Expression ".\$sub\topic_publisher --messages $message_count --batches $batches --subscribers $subscribers $host $transactional" 2>&1
 }
 
 if ($broker.length) {
@@ -60,11 +63,11 @@
 
 $i = $subscribers
 while ($i -gt 0) {
-  subscribe $i
+  subscribe $i $sub
   $i--
 }
 
 # FIXME aconway 2007-03-27: Hack around startup race. Fix topic test.
 Start-Sleep 2
-publish
+publish $sub
 exit $LastExitCode



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org