00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 __facility__ = "Online"
00011 __abstract__ = "Sample suite class based on seSuiteBase"
00012 __author__ = "S. Tuvi <stuvi@SLAC.Stanford.edu> SLAC - GLAST LAT I&T/Online"
00013 __date__ = "2005/07/23 00:08:27"
00014 __updated__ = "$Date: 2006/04/28 02:13:15 $"
00015 __version__ = "$Revision: 1.8 $"
00016 __release__ = "$Name: HEAD $"
00017 __credits__ = "SLAC"
00018
00019 import LICOS.copyright_SLAC
00020
00021 import logging as log
00022
00023 from LICOS.lib.scriptEngine.seSuiteBase import seSuiteBase
00024
00025 class testSuite2(seSuiteBase):
00026 """!\brief Sample suite class based on seSuiteBase.
00027
00028 It is called from testSuite as a sub suite.
00029 """
00030 def __init__(self, common):
00031 """!\brief testSuite2 constructor.
00032
00033 Here the script can do any initialization that is required
00034 once per suite load.
00035
00036 \param common ScriptEngineCommon instance
00037 """
00038 seSuiteBase.__init__(self, common)
00039
00040 def setup(self):
00041 """!\brief SETUP transition method.
00042
00043 Any code that is required before the suite starts
00044 can be entered here. This method is usually where
00045 the application scripts are loaded.
00046
00047 \return Transition result
00048 """
00049 log.info("%s Suite setup" % self.getName())
00050 self.__app = self.scriptLoad("testApp")
00051
00052
00053
00054 self.__app.setLastSuiteScript()
00055
00056 def run(self):
00057 """!\brief RUN transition method.
00058
00059 Any code that is required before the suite starts
00060 can be entered here. This method is usually where
00061 the application scripts are loaded.
00062
00063 \return Transition result
00064 """
00065 log.debug("%s Suite run" % self.getName())
00066 sessionvar = "suiteSessionVar"
00067 log.debug("%s: Session variable %s:%s" %
00068 (self.getName(),
00069 sessionvar,
00070 self.getSessionVar(sessionvar)))
00071 self.scriptRun(self.__app)
00072
00073 def stopRun(self):
00074 """!\brief STOP_RUN transition method.
00075
00076 """
00077 log.debug("%s Suite stopRun" % self.getName())
00078
00079 def pause(self):
00080 """!\brief PAUSE transition method.
00081
00082 """
00083 log.debug("%s Suite pause" % self.getName())
00084
00085 def resume(self):
00086 """!\brief RESUME transition method.
00087
00088 """
00089 log.debug("%s Suite resume" % self.getName())
00090
00091 def stop(self):
00092 """!\brief STOP transition method.
00093
00094 """
00095 log.debug("%s Suite stop" % self.getName())
00096
00097 def abort(self):
00098 """!\brief ABORT transition method.
00099
00100 """
00101 log.debug("%s Suite abort" % self.getName())