9 TESTING_DIR = 
'/afs/cern.ch/user/a/atlasdqm/dqmdisk1/testing_references' 
   16         '''Test that histogram merging + postprocessing works''' 
   18         print(
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
 
   19         print(
'Running merge test ....')
 
   20         print(
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
 
   21         outdir = os.environ.get(
'TMPDIR', 
'.')
 
   22         inlist = os.path.join(TESTING_DIR, 
'test_merging')
 
   23         self.
outfile = os.path.join(outdir, 
'data09_calophys.00128005.physics_CosmicMuons.root')
 
   24         rv = os.system(
'cd %s ; DQHistogramMerge.py %s %s True' % (outdir, inlist, self.
outfile))
 
   25         self.assertTrue(rv==0, 
"DQHistogramMerge.py return code is nonzero")
 
   28         '''Test that a terminal web display job works''' 
   30         print(
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
 
   31         print(
'Running web display test ....')
 
   32         print(
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
 
   33         outdir = os.environ.get(
'TMPDIR', 
'.')
 
   34         infile = os.path.join(TESTING_DIR, 
'data09_calophys.00128005.physics_CosmicMuons.root')
 
   35         rv = os.system(
'cd %s ; DQWebDisplay.py %s TestDisplay 123' % (outdir, infile))
 
   36         self.assertTrue(rv==0, 
"DQWebDisplay.py return code is nonzero")
 
   39         '''Test that a terminal web display job works in temporary accumulation mode''' 
   41         print(
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
 
   42         print(
'Running intermediate web display test ....')
 
   43         print(
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
 
   44         outdir = os.environ.get(
'TMPDIR', 
'.')
 
   45         infile = os.path.join(TESTING_DIR, 
'data09_calophys.00128005.physics_CosmicMuons.root')
 
   46         from DataQualityConfigurations.TestDisplay 
import dqconfig
 
   47         cachedir = dqconfig.histogramCache
 
   49             self.fail(
'Unable to test intermediate web displays; no histogramCache directory set')
 
   50         if not os.access(cachedir, os.W_OK):
 
   51             print(
"No write permissions for cache dir %s; skipping test" % cachedir)
 
   53         cachefilename = os.path.basename(infile).rsplit(
'.',1)[-2] + 
'.CACHE_1' 
   54         shutil.copy(infile, os.path.join(cachedir, cachefilename))
 
   56         rv = os.system(
'cd %s ; DQWebDisplay.py %s TestDisplay 123 True' % (outdir, infile))
 
   57         self.assertTrue(rv==0, 
"DQWebDisplay.py return code is nonzero")
 
   67     suite = unittest.TestLoader().loadTestsFromTestCase(DQUTestCase)
 
   70 if __name__ == 
'__main__':