6from WorkflowTestRunner.ScriptUtils
import setup_logger, setup_parser, get_test_setup, get_standard_performance_checks, \
8from WorkflowTestRunner.StandardTests
import QTest, GenerationTest, SimulationTest, OverlayTest, PileUpTest, DerivationTest
14 run = WorkflowRun.Run2
17 log = setup_logger(name)
18 parser = setup_parser()
19 options = parser.parse_args()
20 setup = get_test_setup(name, options, log)
24 if options.generation:
25 dsid =
"421356" if not options.dsid
else options.dsid
26 if "inputEVNT_PreFile" in options.extra_args:
27 tests_to_run.append(GenerationTest(f
"gen{dsid}", run, WorkflowType.Generation, [
"afterburn"], setup, options.extra_args))
29 tests_to_run.append(GenerationTest(f
"gen{dsid}", run, WorkflowType.Generation, [
"generate"], setup, options.extra_args))
30 elif options.simulation:
31 if not options.workflow
or options.workflow
is WorkflowType.FullSim:
32 tests_to_run.append(SimulationTest(
"s4005", run, WorkflowType.FullSim, [
"EVNTtoHITS"], setup, options.extra_args))
33 if not options.workflow
or options.workflow
is WorkflowType.AF3:
34 log.error(
"AF3 not supported yet")
36 if not options.workflow
or options.workflow
is WorkflowType.MCOverlay:
37 tests_to_run.append(OverlayTest(
"d1726", run, WorkflowType.MCOverlay, [
"Overlay"], setup, options.extra_args))
39 if setup.parallel_execution:
40 log.error(
"Parallel execution not supported for pile-up workflow")
42 if not options.workflow
or options.workflow
is WorkflowType.PileUpPresampling:
43 tests_to_run.append(PileUpTest(
"d1918", run, WorkflowType.PileUpPresampling, [
"HITtoRDO"], setup, options.extra_args))
44 if not options.workflow
or options.workflow
is WorkflowType.MCPileUpReco:
45 tests_to_run.append(QTest(
"q453", run, WorkflowType.MCPileUpReco, [
"Overlay",
"RAWtoALL"], setup, options.extra_args))
46 elif options.derivation:
47 test_id =
"MC_PHYS" if not options.ami_tag
else options.ami_tag
48 test_id = f
"{test_id}_{run.value}"
49 tests_to_run.append(DerivationTest(test_id, run, WorkflowType.Derivation, [
"Derivation"], setup, options.extra_args))
51 if not options.workflow
or options.workflow
is WorkflowType.MCReco:
52 tests_to_run.append(QTest(
"q452", run, WorkflowType.MCReco, [
"HITtoRDO",
"RDOtoRDOTrigger",
"RAWtoALL"], setup, options.extra_args))
53 if not options.workflow
or options.workflow
is WorkflowType.DataReco:
54 tests_to_run.append(QTest(
"q442", run, WorkflowType.DataReco, [
"RAWtoALL",
"DQHistogramMerge"], setup, options.extra_args))
57 performance_checks = get_standard_performance_checks(setup)
63 all_passed = run_checks(setup, tests_to_run, performance_checks)
66 run_summary(setup, tests_to_run, all_passed)