certi-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[certi-cvs] applications/HLA_TestsSuite dtest_test_Sync.py


From: certi-cvs
Subject: [certi-cvs] applications/HLA_TestsSuite dtest_test_Sync.py
Date: Mon, 16 Jun 2008 10:42:14 +0000

CVSROOT:        /sources/certi
Module name:    applications
Changes by:     Eric NOULARD <erk>      08/06/16 10:42:14

Modified files:
        HLA_TestsSuite : dtest_test_Sync.py 

Log message:
        First working dtest scripts for test_Sync

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/applications/HLA_TestsSuite/dtest_test_Sync.py?cvsroot=certi&r1=1.1&r2=1.2

Patches:
Index: dtest_test_Sync.py
===================================================================
RCS file: /sources/certi/applications/HLA_TestsSuite/dtest_test_Sync.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- dtest_test_Sync.py  13 Jun 2008 11:43:52 -0000      1.1
+++ dtest_test_Sync.py  16 Jun 2008 10:42:14 -0000      1.2
@@ -67,10 +67,10 @@
 rtig = dtest.DTester("RTIG",
                      
session=dtest.SSHSessionHandler(rtig_param['user'],host=rtig_param['host']))
 
-firstFederate = dtest.DTester("test_Sync_FIRST",
+firstFederate = dtest.DTester("test_Sync_First",
                                
session=dtest.SSHSessionHandler(federate_param['user'],host=federate_param['host']))
 
-otherFederate = dtest.DTester("test_Sync_Other",
+otherFederate = dtest.DTester("test_Sync_Other1",
                                
session=dtest.SSHSessionHandler(federate_param['user'],host=federate_param['host']))
 
 # you may change the default time out value
@@ -90,7 +90,9 @@
 rtig.addRunStep("barrier","All Federate(s) ended")
 rtig.addRunStep("terminateCommand")
 rtig.addRunStep("waitCommandTermination")
-rtig.addRunStep("ok",True,"HLA test create_destroy Ends.")
+rtig.addRunStep("ok",True,"HLA test test_Sync Ends.")
+
+#dtest.DTester.logger.setLevel(level=logging.DEBUG)
 
 # describe first federate run steps
 firstFederate.timeout = 20
@@ -104,19 +106,22 @@
 firstFederate.addRunStep("expectFromCommand",pattern="Joined federation.*")
 firstFederate.addRunStep("ok",firstFederate.getFutureLastStepStatus,"First 
Federate started and has joined federation")
 firstFederate.addRunStep("expectFromCommand",pattern="Press ENTER to start 
execution")
-firstFederate.addRunStep("barrier","First Federate waiting other before going 
on")
+firstFederate.addRunStep("barrier","First Federate waiting other(s) before 
going on")
 firstFederate.addRunStep("barrier","Other Federate started")
 firstFederate.addRunStep("sendToCommand",string="\n")
-firstFederate.addRunStep("ok",firstFederate.getFutureLastStepStatus,"Sync 
Sequence begins...")
 
-firstFederate.addRunStep("expectFromCommand",pattern="syncPointRegSucc: sync?")
+firstFederate.addRunStep("barrier","Sync Sequence starts...")
+
+firstFederate.addRunStep("expectFromCommand",pattern="syncPointRegSucc: 
sync[0-9]+")
 
firstFederate.addRunStep("ok",firstFederate.getFutureLastStepStatus,"SynchronizationPointRegisterSucceeded
 received - "+firstFederate.name)
-firstFederate.addRunStep("expectFromCommand",pattern="announceSyncPoint: 
sync?")
-firstFederate.addRunStep("ok",firstFederate.getFutureLastStepStatus,"announceSynchronization
 received -"+firstFederate.name)
-firstFederate.addRunStep("expectFromCommand",pattern="fedSync: .*")
-firstFederate.addRunStep("ok",firstFederate.getFutureLastStepStatus,"federationSynchronized
 received -"+firstFederate.name)
+firstFederate.addRunStep("expectFromCommand",pattern="announceSyncPoint: 
sync[0-9]+")
+firstFederate.addRunStep("ok",firstFederate.getFutureLastStepStatus,"announceSynchronization
 received - "+firstFederate.name)
 
+for i in range(1,6):
+    firstFederate.addRunStep("expectFromCommand",pattern="fedSync: sync[0-9]+")
+    
firstFederate.addRunStep("ok",firstFederate.getFutureLastStepStatus,"federationSynchronized
 received %d - %s" % (i,firstFederate.name))
 
+firstFederate.addRunStep("barrier","Sync Sequence end.")
 firstFederate.addRunStep("terminateCommand")
 firstFederate.addRunStep("barrier","All Federate(s) ended")
 
@@ -126,7 +131,7 @@
 otherFederate.stdin   = file(otherFederate.name + ".in",'w+')
 otherFederate.stderr  = file(otherFederate.name + ".err",'w+')
 otherFederate.addRunStep("barrier","RTIG started")
-otherFederate.addRunStep("barrier","First Federate waiting other before going 
on")
+otherFederate.addRunStep("barrier","First Federate waiting other(s) before 
going on")
 
dtest.ReusableSequences.addConditionalRunShellScript(otherFederate,c_shell_cmd="source
 "+certi_home+"/share/scripts/myCERTI_env.csh "+rtig_param['host'],
                                bourne_shell_cmd="source 
"+certi_home+"/share/scripts/myCERTI_env.sh "+rtig_param['host'])
 otherFederate.addRunStep("runCommand",command=federate_param['path']+" 1")
@@ -134,23 +139,18 @@
 otherFederate.addRunStep("ok",otherFederate.getFutureLastStepStatus,"Other 
Federate started and has joined federation")
 otherFederate.addRunStep("barrier","Other Federate started")
 
-otherFederate.addRunStep("expectFromCommand",pattern="announceSyncPoint: 
sync?")
-otherFederate.addRunStep("ok",otherFederate.getFutureLastStepStatus,"announceSynchronization
 received -"+otherFederate.name )
-otherFederate.addRunStep("expectFromCommand",pattern="Synchronization Point 
sync? reached.*")
-otherFederate.addRunStep("sendToCommand",string="\n")
-otherFederate.addRunStep("ok",otherFederate.getFutureLastStepStatus,"synchronizationPointAchieved
 sent -"+otherFederate.name )
-otherFederate.addRunStep("expectFromCommand",pattern="fedSync: .*")
-otherFederate.addRunStep("ok",otherFederate.getFutureLastStepStatus,"federationSynchronized
 received -"+otherFederate.name )
-
-
-otherFederate.addRunStep("expectFromCommand",pattern="Synchronization Point 
sync? reached.*")
-otherFederate.addRunStep("sendToCommand",string="\n")
-otherFederate.addRunStep("expectFromCommand",pattern="Synchronization Point 
sync? reached.*")
-otherFederate.addRunStep("sendToCommand",string="\n")
-otherFederate.addRunStep("expectFromCommand",pattern="Synchronization Point 
sync? reached.*")
-otherFederate.addRunStep("sendToCommand",string="\n")
-otherFederate.addRunStep("expectFromCommand",pattern="Synchronization Point 
sync? reached.*")
-otherFederate.addRunStep("sendToCommand",string="\n")
+otherFederate.addRunStep("expectFromCommand",pattern="announceSyncPoint: 
sync[0-9]?")
+otherFederate.addRunStep("ok",otherFederate.getFutureLastStepStatus,"announceSynchronization
 received - "+otherFederate.name )
+
+otherFederate.addRunStep("barrier","Sync Sequence starts...")
+for i in range(1,6):
+    otherFederate.addRunStep("expectFromCommand",pattern="Synchronization 
Point sync[0-9]+ reached")
+    otherFederate.addRunStep("sendToCommand",string="\n")
+    
otherFederate.addRunStep("ok",otherFederate.getFutureLastStepStatus,"synchronizationPointAchieved
 sent %d - %s " % (i,otherFederate.name) )
+    otherFederate.addRunStep("expectFromCommand",pattern="fedSync: sync[0-9]+")
+    
otherFederate.addRunStep("ok",otherFederate.getFutureLastStepStatus,"federationSynchronized
 received %d - %s " % (i,otherFederate.name) )
+
+otherFederate.addRunStep("barrier","Sync Sequence end.")
 otherFederate.addRunStep("terminateCommand")
 otherFederate.addRunStep("barrier","All Federate(s) ended")
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]