ATLAS Offline Software
Functions
RunWorkflowTests_Run2 Namespace Reference

Functions

def main ()
 

Function Documentation

◆ main()

def RunWorkflowTests_Run2.main ( )

Definition at line 12 of file RunWorkflowTests_Run2.py.

12 def main():
13  name = "Run2Tests"
14  run = WorkflowRun.Run2
15 
16  # Setup the environment
17  log = setup_logger(name)
18  parser = setup_parser()
19  options = parser.parse_args()
20  setup = get_test_setup(name, options, log)
21 
22  # Define which tests to run
23  tests_to_run = []
24  if options.generation:
25  dsid = "421356" if not options.dsid else options.dsid
26  tests_to_run.append(GenerationTest(f"gen{dsid}", run, WorkflowType.Generation, ["generate"], setup, options.extra_args))
27  elif options.simulation:
28  if not options.workflow or options.workflow is WorkflowType.FullSim:
29  tests_to_run.append(SimulationTest("s4005", run, WorkflowType.FullSim, ["EVNTtoHITS"], setup, options.extra_args))
30  if not options.workflow or options.workflow is WorkflowType.AF3:
31  log.error("AF3 not supported yet")
32  elif options.overlay:
33  if not options.workflow or options.workflow is WorkflowType.MCOverlay:
34  tests_to_run.append(OverlayTest("d1726", run, WorkflowType.MCOverlay, ["Overlay"], setup, options.extra_args))
35  if not options.workflow or options.workflow is WorkflowType.DataOverlay:
36  tests_to_run.append(DataOverlayTest("d1912", run, WorkflowType.DataOverlay, ["Overlay"], setup, options.extra_args))
37  elif options.pileup:
38  if setup.parallel_execution:
39  log.error("Parallel execution not supported for pile-up workflow")
40  exit(1)
41  if not options.workflow or options.workflow is WorkflowType.PileUpPresampling:
42  tests_to_run.append(PileUpTest("d1918", run, WorkflowType.PileUpPresampling, ["HITtoRDO"], setup, options.extra_args))
43  if not options.workflow or options.workflow is WorkflowType.MCPileUpReco:
44  tests_to_run.append(QTest("q453", run, WorkflowType.MCPileUpReco, ["Overlay", "RAWtoALL"], setup, options.extra_args))
45  elif options.derivation:
46  test_id = "MC_PHYS" if not options.ami_tag else options.ami_tag
47  test_id = f"{test_id}_{run.value}"
48  tests_to_run.append(DerivationTest(test_id, run, WorkflowType.Derivation, ["Derivation"], setup, options.extra_args))
49  else:
50  if not options.workflow or options.workflow is WorkflowType.MCReco:
51  tests_to_run.append(QTest("q452", run, WorkflowType.MCReco, ["HITtoRDO", "RDOtoRDOTrigger", "RAWtoALL"], setup, options.extra_args))
52  if not options.workflow or options.workflow is WorkflowType.DataReco:
53  tests_to_run.append(QTest("q442", run, WorkflowType.DataReco, ["RAWtoALL", "DQHistogramMerge"], setup, options.extra_args))
54 
55  # Define which perfomance checks to run
56  performance_checks = get_standard_performance_checks(setup)
57 
58  # Define and run jobs
59  run_tests(setup, tests_to_run)
60 
61  # Run post-processing checks
62  all_passed = run_checks(setup, tests_to_run, performance_checks)
63 
64  # final report
65  run_summary(setup, tests_to_run, all_passed)
66 
67 
python.ScriptUtils.setup_logger
logging.Logger setup_logger(str name)
Definition: ScriptUtils.py:15
python.ScriptUtils.get_standard_performance_checks
List[WorkflowCheck] get_standard_performance_checks(TestSetup setup)
Definition: ScriptUtils.py:224
RunWorkflowTests_Run2.main
def main()
Definition: RunWorkflowTests_Run2.py:12
python.ScriptUtils.run_summary
None run_summary(TestSetup setup, List[WorkflowTest] tests, bool status)
Definition: ScriptUtils.py:284
calibdata.exit
exit
Definition: calibdata.py:236
python.ScriptUtils.setup_parser
ArgumentParser setup_parser()
Definition: ScriptUtils.py:63
python.ScriptUtils.get_test_setup
TestSetup get_test_setup(str name, Namespace options, logging.Logger log)
Definition: ScriptUtils.py:135
python.ScriptUtils.run_tests
None run_tests(TestSetup setup, List[WorkflowTest] tests)
Definition: ScriptUtils.py:234
python.ScriptUtils.run_checks
bool run_checks(TestSetup setup, List[WorkflowTest] tests, List[WorkflowCheck] performance_checks)
Definition: ScriptUtils.py:269