All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
event_timeout_abort_test.py
Go to the documentation of this file.
1 # -*- coding: utf-8 -*-
2 import BaseTest
3 from BaseTest import *
4 
5 class Test(BaseTest):
6 
7  def __init__(self):
8  BaseTest.__init__(self)
9  self.name = os.path.basename(__file__)[:-5]
10  self.program="gaudirun.py"
11  self.signal=6
12  self.options="""
13 from Gaudi.Configuration import *
14 
15 from Configurables import GaudiTesting__SleepyAlg as SleepyAlg
16 from Configurables import StalledEventMonitor
17 
18 importOptions("Common.opts")
19 
20 alg = SleepyAlg("Sleepy", SleepTime = 10)
21 sem = StalledEventMonitor(EventTimeout = 5,
22  MaxTimeoutCount = 1,
23  StackTrace = True)
24 
25 app = ApplicationMgr(TopAlg = [alg],
26  EvtSel = "NONE", EvtMax = 2,
27  StalledEventMonitoring = True)
28 """
29 
30  def validator(self,stdout,stderr, result, causes, reference, error_reference):
31  import re
32  stdout = re.subn(r"size = [0-9]+(\.[0-9]*)? MB", "size = # MB", stdout)[0]
33 
34  self.findReferenceBlock("EventWatchdog FATAL too much time on a single event: aborting process")
35 
36  self.findReferenceBlock("=== Stalled event: current stack trace ===", stdout=stderr, id='stderr')
37 
38  if not 'in GaudiTesting::SleepyAlg::execute' in stderr:
39  causes.append('invalid stack trace')
def findReferenceBlock
Definition: BaseTest.py:178