[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[certi-cvs] applications/HLA_TestsSuite dtest_test_TRTCCall...
From: |
certi-cvs |
Subject: |
[certi-cvs] applications/HLA_TestsSuite dtest_test_TRTCCall... |
Date: |
Thu, 19 Jun 2008 11:11:54 +0000 |
CVSROOT: /sources/certi
Module name: applications
Changes by: Eric NOULARD <erk> 08/06/19 11:11:54
Modified files:
HLA_TestsSuite : dtest_test_TRTCCallbacks.py CMakeLists.txt
Log message:
Add working test_TRTCCallbacks dtest script
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/applications/HLA_TestsSuite/dtest_test_TRTCCallbacks.py?cvsroot=certi&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/applications/HLA_TestsSuite/CMakeLists.txt?cvsroot=certi&r1=1.13&r2=1.14
Patches:
Index: dtest_test_TRTCCallbacks.py
===================================================================
RCS file:
/sources/certi/applications/HLA_TestsSuite/dtest_test_TRTCCallbacks.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- dtest_test_TRTCCallbacks.py 18 Jun 2008 20:18:01 -0000 1.1
+++ dtest_test_TRTCCallbacks.py 19 Jun 2008 11:11:53 -0000 1.2
@@ -70,9 +70,6 @@
firstFederate = dtest.DTester("test_TRTCCallbacks_First",
session=dtest.SSHSessionHandler(federate_param['user'],host=federate_param['host']))
-otherFederate = dtest.DTester("test_TRTCCallbacks_Other1",
-
session=dtest.SSHSessionHandler(federate_param['user'],host=federate_param['host']))
-
# you may change the default time out value
rtig.timeout = 40
# you add want to save the output of your dtester to a file.
@@ -102,58 +99,28 @@
firstFederate.addRunStep("barrier","RTIG started")
dtest.ReusableSequences.addConditionalRunShellScript(firstFederate,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'])
-firstFederate.addRunStep("runCommand",command=federate_param['path']+" 1")
+firstFederate.addRunStep("runCommand",command=federate_param['path'])
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(s) before
going on")
-firstFederate.addRunStep("barrier","Other Federate started")
+#firstFederate.addRunStep("barrier","First Federate waiting other(s) before
going on")
+#firstFederate.addRunStep("barrier","Other Federate started")
firstFederate.addRunStep("sendToCommand",string="\n")
-firstFederate.addRunStep("barrier","Sync Sequence starts...")
+firstFederate.addRunStep("barrier","TRTC Sequence starts...")
+
+firstFederate.addRunStep("expectFromCommand",pattern="Time Regulation Enabled,
press ENTER to continue")
+firstFederate.addRunStep("ok",firstFederate.getFutureLastStepStatus,"TimeRegulationEnabled
received - "+firstFederate.name)
+firstFederate.addRunStep("sendToCommand",string="\n")
-firstFederate.addRunStep("expectFromCommand",pattern="syncPointRegSucc:
sync[0-9]+")
-firstFederate.addRunStep("ok",firstFederate.getFutureLastStepStatus,"SynchronizationPointRegisterSucceeded
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("expectFromCommand",pattern="Time Constrained
Enabled, press ENTER to continue")
+firstFederate.addRunStep("ok",firstFederate.getFutureLastStepStatus,"TimeConstrainedEnabled
received - "+firstFederate.name)
+firstFederate.addRunStep("sendToCommand",string="\n")
-firstFederate.addRunStep("barrier","Sync Sequence end.")
+firstFederate.addRunStep("barrier","TRTC Sequence end.")
firstFederate.addRunStep("terminateCommand")
firstFederate.addRunStep("barrier","All Federate(s) ended")
-# other federate
-otherFederate.timeout = 20
-otherFederate.stdout = file(otherFederate.name + ".out",'w+')
-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(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")
-otherFederate.addRunStep("expectFromCommand",pattern="Joined federation.*")
-otherFederate.addRunStep("ok",otherFederate.getFutureLastStepStatus,"Other
Federate started and has joined federation")
-otherFederate.addRunStep("barrier","Other Federate started")
-
-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")
-
def goTest():
myDTestMaster = dtest.DTestMaster("HLA test test_TRTCCallbacks
Starts","Launch RTIG + 1 federate for testing TimeRegulated and TimeConstrained
callbacks,...")
myDTestMaster.timeout = 40
Index: CMakeLists.txt
===================================================================
RCS file: /sources/certi/applications/HLA_TestsSuite/CMakeLists.txt,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- CMakeLists.txt 16 Jun 2008 10:47:31 -0000 1.13
+++ CMakeLists.txt 19 Jun 2008 11:11:54 -0000 1.14
@@ -139,6 +139,7 @@
HLATestsSuite_ADD_TEST(test_TRTCCallbacks
FED_FILE test_TRTCCallbacks.fed
SOURCE_FILES test_TRTCCallbacks.cc
+ DTEST_SCRIPT dtest_test_TRTCCallbacks.py
COMMENTS "Test HLA TimeRegulating and TimeConstrained
Callbacks")
#########################################################################