Skip to content
Snippets Groups Projects
Commit 21600454 authored by Tamara Vazquez Schroeder's avatar Tamara Vazquez Schroeder Committed by Adam Edward Barton
Browse files

adding new TrigP1 build test to run Rulebook

parent 05fef8be
No related branches found
No related tags found
5 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3
......@@ -14,7 +14,7 @@ atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
atlas_install_joboptions( share/*.py )
atlas_install_data( share/*.ref )
atlas_install_runtime( Testing/*.trans Testing/*.conf )
atlas_install_scripts( bin/*.py test/test*.sh test/test*.py)
atlas_install_scripts( bin/*.py bin/*.sh test/test*.sh test/test*.py)
# Unit tests:
atlas_add_test( flake8_test_dir
......
# Ignore WARNINGS and expected errors from the rulebook due to mismatch of chains in menu and rules
ignore '.*?\|\s*WARNING\s*\|.*'
ignore 'ERROR RuleReader*'
ignore 'ERROR OutputChecker*'
ignore 'CRITICAL OutputChecker*'
ignore 'FATAL : Duplicated rule*'
#!/bin/bash
echo "Setting up the TrigMenuRulebook"
export ATLAS_LOCAL_ROOT_BASE="/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase"
source $ATLAS_LOCAL_ROOT_BASE/packageSetups/localSetup.sh git
klist -l | grep 'CERN\.CH' > /dev/null
if [ $? -ne 0 ]; then
echo "ERROR no Kerberos token found, cannot check out rulebook"
exit 1
fi
git clone https://:@gitlab.cern.ch:8443/atlas-trigger-menu/TrigMenuRulebook.git -o upstream
if [ $? -ne 0 ]; then
echo "ERROR git clone failed"
exit 1
fi
RB_PATH_SCRIPTS=TrigMenuRulebook/scripts
totalPhysP1json=`ls *_PhysicsP1_pp_run3_v1_*.json | wc -l`
if [ $totalPhysP1json -gt 4 ]; then
echo "ERROR More JSON files than needed"
exit 1
elif [ $totalPhysP1json -lt 4 ]; then
echo "ERROR Less JSON files than needed"
exit 1
fi
cp HLTMenu_PhysicsP1_pp_run3_v1_*.json ${RB_PATH_SCRIPTS}/HLTMenu.json
cp HLTPrescalesSet_PhysicsP1_pp_run3_v1_*.json ${RB_PATH_SCRIPTS}/HLTPrescale.json
cp L1Menu_PhysicsP1_pp_run3_v1_*.json ${RB_PATH_SCRIPTS}/L1Menu.json
cp L1PrescalesSet_PhysicsP1_pp_run3_v1_*.json ${RB_PATH_SCRIPTS}/L1Prescale.json
exit 0
#!/usr/bin/env python
# art-description: PhysicsP1_pp_run3_v1 menu test only dumping options for SMK generation and running RuleBook to create prescales
# art-type: build
# art-include: master/Athena
from TrigValTools.TrigValSteering import Step, Test, ExecStep, CheckSteps
#====================================================================================================
# Run Physics menu and produce files to create SMK
menu = ExecStep.ExecStep('RunPhysMenu')
menu.type = 'athenaHLT'
menu.job_options = 'TriggerJobOpts/runHLT_standalone.py'
menu.input = 'data'
menu.args = '-c "setMenu=\'PhysicsP1_pp_run3_v1\';"'
menu.args += ' -M --dump-config-exit'
menu.perfmon = False # Cannot use PerfMon with -M
#====================================================================================================
# Download and setup RuleBook and create prescales
rbsetup = ExecStep.ExecStep('SetupRulebook')
rbsetup.type = 'other'
rbsetup.executable = 'setupTrigMenuRulebook.sh'
rbsetup.input = ''
#====================================================================================================
# Run RuleBook and create prescales
ps = ExecStep.ExecStep('RunRulebook')
ps.type = 'other'
ps.executable = '(cd TrigMenuRulebook/scripts && ./runRuleBook.py "PhysicsP1_pp_run3_v1_rules:runOptions.ignoreErrors=True" 20000 output_RB_ART && cd ../..)'
ps.input = ''
#====================================================================================================
# The full test
test = Test.Test()
test.art_type = 'build'
test.exec_steps = [menu,rbsetup,ps]
# Only keep relevant checks from the defaults
test.check_steps = [chk for chk in CheckSteps.default_check_steps(test)
if type(chk) in (CheckSteps.LogMergeStep, CheckSteps.CheckLogStep)]
# Ignore expected errors from the rulebook due to mismatch of chains in menu and rules
checklog = test.get_step("CheckLog")
checklog.config_file = 'checklogTrigP1Rulebook.conf'
# Collect error message but do not make the test fail
checkRBerr = CheckSteps.CheckLogStep('CheckRBErrors')
checkRBerr.output_stream = Step.Step.OutputStream.FILE_ONLY
checkRBerr.required = False
test.check_steps.append(checkRBerr)
import sys
sys.exit(test.run())
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment