All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
timing_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.args=["Timing.py"]
12 
13  def validator(self,stdout,stderr, result, causes, reference, error_reference):
14  import re
15  expected = ( r"Timing\s+SUCCESS\s+The timing is \(in us\)\s*\n" +
16  r"\|\s*\|\s*#\s*\|\s*Total\s*\|\s*Mean\+-RMS\s*\|\s*Min/Max\s*\|\s*\n" +
17  r"\|\s*\(1U\)\s*\|\s*\d*\s*\|(?:[-+.\deE /]+\|){3}\s*\n" +
18  r"\|\s*\(2U\)\s*\|\s*\d*\s*\|(?:[-+.\deE /]+\|){3}\s*\n" +
19  r"\|\s*\(3U\)\s*\|\s*\d*\s*\|(?:[-+.\deE /]+\|){3}\s*\n" )
20  if not re.search(expected,stdout):
21  causes.append("missing regexp match")
22  result["GaudiTest.regexp"] = result.Quote(expected.replace("\\n","\n"))