Verified Commit 7f896cda authored by Tadej Novak's avatar Tadej Novak
Browse files

Allow translating legacy pre/postIncludes to CA-based

parent 1b35b189
Pipeline #3293308 passed with stage
in 0 seconds
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
from AthenaCommon.Logging import logging
def executeFromFragment(fragment_string, flags, cfg=None):
"""Execute a function from a pre/post include fragment."""
# detect legacy job options in the transition period:
if fragment_string.endswith('.py'):
log = logging.getLogger('PyJobTransforms')
log.warning(f'Trying to load legacy job options {fragment_string}. This should NOT be used in production!')
fragment_string = fragment_string[:-3]
fragment_string = fragment_string.replace('/', '.')
log.warning(f'Resolved to {fragment_string}')
parts = fragment_string.split('.')
if len(parts) < 2:
raise ValueError('Pre/post include should be of the form Package.Module.Function or Package.Function if defined in __init__.py')
......@@ -71,7 +80,6 @@ def UseFrontier(flags):
in simulation ATN and KV jobs
"""
from os import environ
from AthenaCommon.Logging import logging
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory
......
......@@ -32,10 +32,11 @@ def main():
exit(1)
tests_to_run.append(PileUpTest("d1730", run, WorkflowType.PileUpPresampling, ["HITtoRDO"], setup, options.extra_args))
tests_to_run.append(QTest("q444", run, WorkflowType.MCPileUpReco, ["RAWtoESD", "ESDtoAOD"], setup, options.extra_args))
elif options.reco and "--CA" in options.extra_args:
tests_to_run.append(QTest("q442", run, WorkflowType.DataReco, ["RAWtoALL"], setup, options.extra_args))
else:
tests_to_run.append(QTest("q443", run, WorkflowType.MCReco, ["HITtoRDO", "RAWtoESD", "ESDtoAOD"], setup, options.extra_args))
if "--CA" in options.extra_args:
tests_to_run.append(QTest("q443", run, WorkflowType.MCReco, ["HITtoRDO", "RAWtoALL"], setup, options.extra_args + " --steering doRAWtoALL"))
else:
tests_to_run.append(QTest("q443", run, WorkflowType.MCReco, ["HITtoRDO", "RAWtoESD", "ESDtoAOD"], setup, options.extra_args))
tests_to_run.append(QTest("q442", run, WorkflowType.DataReco, ["RAWtoALL"], setup, options.extra_args))
# Define which perfomance checks to run
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment