9 import b2test_utils
as b2u
10 import ROOT.Belle2
as B2
12 if 'BELLE2_VALIDATION_DATA_DIR' not in os.environ:
13 b2u.skip_test(
"BELLE2_VALIDATION_DATA_DIR environment variable not set.")
15 steering_file = B2.FileSystem.findFile(
'reconstruction/tests/reco_cdst.py_noexec')
17 for rawdata_file
in glob.glob(os.environ[
'BELLE2_VALIDATION_DATA_DIR'] +
'/rawdata/*HLT?.*.root'):
18 b2.B2INFO(f
'Running the test using {rawdata_file} as input file.')
19 if 'cosmic' in os.path.basename(rawdata_file):
20 assert(0 == subprocess.check_call([
'basf2', steering_file, rawdata_file,
'cosmic']))
21 elif 'physics' in os.path.basename(rawdata_file):
22 assert(0 == subprocess.check_call([
'basf2', steering_file, rawdata_file,
'physics']))
24 b2.B2INFO(
'Not a "cosmic" neither a "physics" run, skipping it.')