All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
timing_histos_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=["$GAUDIEXAMPLESROOT/options/TimingHistograms.py"]
12  self.reference="refs/TimingHistograms.ref"
13 
14  def validator(self,stdout,stderr, result, causes, reference, error_reference):
15  # Default validation.
17 
18  # Check the content of the ROOT file.
19  import os
20  from subprocess import Popen, PIPE
21 
22  testscript = os.path.join(os.environ['GAUDIEXAMPLESROOT'], 'tests', 'scripts', 'test_timing_histo_file.py')
23 
24  test = Popen(['python', testscript], stdout=PIPE, stderr=PIPE)
25  out, err = test.communicate()
26 
27  result['root_file_check.returncode'] = str(test.returncode)
28  if test.returncode:
29  causes.append('root file content')
30 
31  if out:
32  result['root_file_check.stdout'] = result.Quote(out)
33 
34  if err:
35  causes.append('standard error')
36  result['root_file_check.stderr'] = result.Quote(err)
def validateWithReference
Definition: BaseTest.py:330