ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
python.StandardTests.QTest Class Reference
Inheritance diagram for python.StandardTests.QTest:
Collaboration diagram for python.StandardTests.QTest:

Public Member Functions

None __init__ (self, str ID, WorkflowRun run, WorkflowType type, List[str] steps, TestSetup setup, str extra_args="")
 
None run_reference (self)
 
None run_validation (self)
 
bool run_checks (self, List[WorkflowCheck] performance_checks)
 

Public Attributes

 command
 
 output_checks
 
 digest_checks
 
 ID
 
 tag
 
 steps
 
 skip_performance_checks
 
 run
 
 type
 
 setup
 
 logger
 

Detailed Description

General workflow q-test.

Definition at line 15 of file StandardTests.py.

Constructor & Destructor Documentation

◆ __init__()

None python.StandardTests.QTest.__init__ (   self,
str  ID,
WorkflowRun  run,
WorkflowType  type,
List[str steps,
TestSetup  setup,
str   extra_args = "" 
)

Definition at line 18 of file StandardTests.py.

18  def __init__(self, ID: str, run: WorkflowRun, type: WorkflowType, steps: List[str], setup: TestSetup, extra_args: str = "") -> None:
19  if "maxEvents" not in extra_args:
20  if type == WorkflowType.MCPileUpReco or run == WorkflowRun.Run4:
21  extra_args += " --maxEvents 5"
22  else:
23  extra_args += " --maxEvents 20"
24 
25  if type == WorkflowType.MCPileUpReco:
26  if "inputHITSFile" not in extra_args:
27  extra_args += f" --inputHITSFile {input_HITS[run]}"
28  if "inputRDO_BKGFile" not in extra_args:
29  extra_args += " --inputRDO_BKGFile ../run_d*/myRDO.pool.root"
30 
31  threads = 1
32  threads_argument = '--multithreaded'
33  if setup.custom_threads is not None:
34  threads = setup.custom_threads
35  if threads <= 0:
36  threads_argument = ''
37 
38  self.command = \
39  (f"ATHENA_CORE_NUMBER={threads} Reco_tf.py {threads_argument} --AMIConfig {ID}"
40  f" --imf False {extra_args}")
41 
42  self.output_checks = []
43  # TODO: disable RDO comparison for now
44  # if type == WorkflowType.MCReco:
45  # self.output_checks.append(FrozenTier0PolicyCheck(setup, "RDO", 10))
46  self.output_checks.append(FrozenTier0PolicyCheck(setup, "AOD", 60))
47  self.output_checks.append(FrozenTier0PolicyCheck(setup, "ESD", 20))
48  self.output_checks.append(MetadataCheck(setup, "AOD"))
49 
50  self.digest_checks = []
51  if not setup.disable_output_checks:
52  self.digest_checks.append(AODContentCheck(setup))
53  self.digest_checks.append(AODDigestCheck(setup))
54 
55  super().__init__(ID, run, type, steps, setup)
56 
57 

Member Function Documentation

◆ run_checks()

bool python.Test.WorkflowTest.run_checks (   self,
List[WorkflowCheck performance_checks 
)
inherited

Definition at line 197 of file Tools/WorkflowTestRunner/python/Test.py.

197  def run_checks(self, performance_checks: List[WorkflowCheck]) -> bool:
198  self.logger.info("-----------------------------------------------------")
199  self.logger.info(f"----------- Post-processing of {self.ID} Test -----------")
200  result = True
201 
202  # digest checks
203  for check in self.digest_checks:
204  result = check.run(self) and result
205 
206  # output checks
207  if not self.setup.disable_output_checks:
208  for check in self.output_checks:
209  result = check.run(self) and result
210 
211  if self.setup.validation_only or self.skip_performance_checks:
212  return result # Performance checks against static references not possible
213 
214  # performance checks
215  for check in performance_checks:
216  result = check.run(self) and result
217 
218  return result

◆ run_reference()

None python.Test.WorkflowTest.run_reference (   self)
inherited

Definition at line 160 of file Tools/WorkflowTestRunner/python/Test.py.

160  def run_reference(self) -> None:
161  self.logger.info(f"Running reference in rel {self.setup.release_reference}")
162  self.logger.info(f"\"{self.command}\"")
163 
164  self.reference_path.mkdir(parents=True, exist_ok=True)
165 
166  cmd = (f"cd {self.reference_path};"
167  f"source $AtlasSetup/scripts/asetup.sh {self.setup.release_reference} >& /dev/null;")
168  cmd += f"TRF_NOECHO=1 {self.command} > {self.ID}.log 2>&1"
169 
170  subprocess.call(cmd, shell=True)
171 
172  self.logger.info(f"Finished clean in rel {self.setup.release_reference}")
173  self.logger.info(f"\"{self.command}\"")
174 

◆ run_validation()

None python.Test.WorkflowTest.run_validation (   self)
inherited

Definition at line 175 of file Tools/WorkflowTestRunner/python/Test.py.

175  def run_validation(self) -> None:
176  self.logger.info(f"Running validation in rel {self.setup.release_validation}")
177  self.logger.info(f"\"{self.command}\"")
178 
179  self.validation_path.mkdir(parents=True, exist_ok=True)
180 
181  cmd = f"cd {self.validation_path};"
182  if self.setup.disable_release_setup or not self.setup.release_validation:
183  pass
184  elif "WorkDir_DIR" in environ:
185  cmake_build_dir = environ["WorkDir_DIR"]
186  cmd += (f"source $AtlasSetup/scripts/asetup.sh {self.setup.release_validation} >& /dev/null;"
187  f"source {cmake_build_dir}/setup.sh;")
188  else:
189  cmd += f"source $AtlasSetup/scripts/asetup.sh {self.setup.release_validation} >& /dev/null;"
190  cmd += f"TRF_NOECHO=1 {self.command} > {self.ID}.log 2>&1"
191 
192  subprocess.call(cmd, shell=True)
193 
194  self.logger.info(f"Finished validation in rel {self.setup.release_validation}")
195  self.logger.info(f"\"{self.command}\"")
196 

Member Data Documentation

◆ command

python.StandardTests.QTest.command

Definition at line 38 of file StandardTests.py.

◆ digest_checks

python.StandardTests.QTest.digest_checks

Definition at line 50 of file StandardTests.py.

◆ ID

python.Test.WorkflowTest.ID
inherited

Definition at line 133 of file Tools/WorkflowTestRunner/python/Test.py.

◆ logger

python.Test.WorkflowTest.logger
inherited

Definition at line 156 of file Tools/WorkflowTestRunner/python/Test.py.

◆ output_checks

python.StandardTests.QTest.output_checks

Definition at line 42 of file StandardTests.py.

◆ run

python.Test.WorkflowTest.run
inherited

Definition at line 153 of file Tools/WorkflowTestRunner/python/Test.py.

◆ setup

python.Test.WorkflowTest.setup
inherited

Definition at line 155 of file Tools/WorkflowTestRunner/python/Test.py.

◆ skip_performance_checks

python.Test.WorkflowTest.skip_performance_checks
inherited

Definition at line 151 of file Tools/WorkflowTestRunner/python/Test.py.

◆ steps

python.Test.WorkflowTest.steps
inherited

Definition at line 139 of file Tools/WorkflowTestRunner/python/Test.py.

◆ tag

python.Test.WorkflowTest.tag
inherited

Definition at line 136 of file Tools/WorkflowTestRunner/python/Test.py.

◆ type

python.Test.WorkflowTest.type
inherited

Definition at line 154 of file Tools/WorkflowTestRunner/python/Test.py.


The documentation for this class was generated from the following file:
grepfile.info
info
Definition: grepfile.py:38
plot_material.mkdir
def mkdir(path, recursive=True)
Definition: plot_material.py:16
dumpHVPathFromNtuple.append
bool append
Definition: dumpHVPathFromNtuple.py:91
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
python.ScriptUtils.run_checks
bool run_checks(TestSetup setup, List[WorkflowTest] tests, List[WorkflowCheck] performance_checks)
Definition: ScriptUtils.py:269