Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
athena
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
atlas
athena
Merge requests
!20124
Sweeping
!20078
from master to 21.1. Add script to summarise results of locally-ran trigger ART tests
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Sweeping
!20078
from master to 21.1. Add script to summarise results of locally-ran trigger ART tests
cherry-pick-3e3553f53c-21.1
into
21.1
Overview
11
Commits
1
Pipelines
1
Changes
1
Merged
Atlas Nightlybuild
requested to merge
cherry-pick-3e3553f53c-21.1
into
21.1
6 years ago
Overview
11
Commits
1
Pipelines
1
Changes
1
Expand
Add script to summarise results of locally-ran trigger ART tests
See merge request
!20078 (merged)
0
0
Merge request reports
Compare
21.1
21.1 (base)
and
latest version
latest version
e44ddeb2
1 commit,
6 years ago
1 file
+
62
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Trigger/TrigValidation/TrigValTools/bin/trig-art-result-parser.sh
0 → 100755
+
62
−
0
Options
#!/bin/bash
#
# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
#
# This script is used to parse output (stdout) from locally-ran Trigger ART tests in order to define the final return
# code of the test. Similarly to ART, it looks for lines starting with "art-result:" and checks the corresponding codes.
# The script returs zero if all results are zero. Otherwise, it returns the first non-zero code it finds.
#
# Usage:
# trig-art-result-parser.sh logfile [stepsToCheck]
#
# Example:
# test_physics_pp_v7_build.sh > stdout.txt
# retcode=`trig-art-result-parser.sh stdout.txt "athena CheckLog RegTest"`
# echo "test_physics_pp_v7_build final result is $retcode"
# The log file to parse
logfile
=
$1
# Step names to check (matching is done to the beginning of the name)
stepsToCheck
=(
$2
)
# If stepsToCheck not provided, set the default value
if
[
-z
"
$stepsToCheck
"
]
;
then
stepsToCheck
=(
athena CheckLog
)
fi
# Take only the lines starting from 'art-result:'
results
=
`
grep
'^art-result:'
$logfile
`
# Iterate over the result lines and parse each of them
echo
"========== art-result summary =========="
retcode
=
0
IFS
=
$'
\n
'
# make newlines the only separator
for
result
in
$results
;
do
resultcode
=
`
echo
$result
|
cut
-d
' '
-f
2
`
stepname
=
`
echo
$result
|
cut
-d
' '
-f
3
`
# Ignore steps which we don't want to check
ignoreThisStep
=
1
for
token
in
"
${
stepsToCheck
[@]
}
"
;
do
if
[[
"
$stepname
"
==
"
$token
"
*
]]
;
then
ignoreThisStep
=
0
break
fi
done
if
[
"
$ignoreThisStep
"
-eq
1
]
;
then
continue
fi
# Print the result and check the return code
echo
$result
if
[
"
$resultcode
"
-ne
"0"
]
&&
[
"
$retcode
"
-eq
"0"
]
;
then
retcode
=
$resultcode
echo
"ERROR: non-zero return code detected, will return
$retcode
as the final result"
fi
done
unset
IFS
exit
$retcode
Loading