Skip to content
Snippets Groups Projects
Commit 30d8f032 authored by Scott Snyder's avatar Scott Snyder Committed by scott snyder
Browse files

AthenaPoolTest: Some reference files moved out-of-repository.

Some reference files were dropped during the git conversion.
Allow finding them outside of the repository.
parent 11bd9aaa
No related branches found
No related tags found
No related merge requests found
...@@ -74,6 +74,7 @@ function (athenapooltest_run_test testName jo pattern) ...@@ -74,6 +74,7 @@ function (athenapooltest_run_test testName jo pattern)
@ONLY ) @ONLY )
atlas_add_test( ${testName} atlas_add_test( ${testName}
SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/athenapooltest_${testName}.sh SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/athenapooltest_${testName}.sh
ENVIRONMENT "ATLAS_REFERENCE_TAG=AthenaPoolTest/AthenaPoolTest-01-00-00"
POST_EXEC_SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/test/post_check_with_select.sh ${testName} ${pattern}" POST_EXEC_SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/test/post_check_with_select.sh ${testName} ${pattern}"
PROPERTIES TIMEOUT 900 PROPERTIES TIMEOUT 900
) )
......
#!/bin/sh -xv #!/bin/sh
#/** @file post.sh #/** @file post.sh
# @brief sh script that check the return code of an executable and compares # @brief sh script that check the return code of an executable and compares
# its output with a reference (if available). # its output with a reference (if available).
...@@ -20,15 +20,39 @@ select=$2 ...@@ -20,15 +20,39 @@ select=$2
joblog=${test}.log joblog=${test}.log
# if [ "$status" = 0 ] # if [ "$status" = 0 ]
# then # then
echo " post.sh> OK: ${test} exited normally. Output is in $joblog " #echo " post.sh> OK: ${test} exited normally. Output is in $joblog "
reflog=../share/${test}.ref reflog=../share/${test}.ref
# If we can't find the reference file, maybe it's located outside
# the repo. With the switch to git, we have to fall back
# to handling the versioning manually.
# ATLAS_REFERENCE_TAG should be a string of the form PACKAGE/VERSION.
# We first look for it in DATAPATH. If we don't find it,
# we then look under ATLAS_REFERENCE_DATA, which falls back
# to an afs path if it's not found.
if [ \( ! -r $reflog \) -a "$ATLAS_REFERENCE_TAG" != "" ]; then
# Look for the file in DATAPATH.
# We have to look for the directory, not the file itself,
# since get_files is hardcoded not to look more than two
# levels down.
get_files -data -symlink $ATLAS_REFERENCE_TAG > /dev/null
reflog=`basename $ATLAS_REFERENCE_TAG`/${test}.ref
if [ ! -r $reflog ]; then
testdata=$ATLAS_REFERENCE_DATA
if [ "$testdata" = "" ]; then
testdata=/afs/cern.ch/atlas/maxidisk/d33/referencefiles
fi
reflog=$testdata/$ATLAS_REFERENCE_TAG/${test}.ref
fi
fi
if [ -r $reflog ] if [ -r $reflog ]
then then
# If select string is non-zero, use it for the comparison, # If select string is non-zero, use it for the comparison,
# otherwise do standard diff with exclusions # otherwise do standard diff with exclusions
if [ -n "${select}" ] if [ -n "${select}" ]
then then
echo "Selecting on: ${select}" #echo "Selecting on: ${select}"
diff -a -b -B $joblog $reflog >> xlog diff -a -b -B $joblog $reflog >> xlog
diff -a -b -B $joblog $reflog |\ diff -a -b -B $joblog $reflog |\
# select only the differing lines # select only the differing lines
...@@ -45,9 +69,9 @@ select=$2 ...@@ -45,9 +69,9 @@ select=$2
egrep -a -v 'package version' |\ egrep -a -v 'package version' |\
# spurious warning for EventSelector # spurious warning for EventSelector
egrep -a -v 'Service already offline' |\ egrep -a -v 'Service already offline' |\
egrep -a -v 'Property update|input handles|output handles|Data Deps|in queryInterface|Default to ConversionSvc' |\ egrep -a -v 'Property update|input handles|output handles|Data Deps|in queryInterface|Default to ConversionSvc|entering handle' |\
# Must remove excess print for CaloShowerContainer # Must remove excess print for CaloShowerContainer
egrep -a -v 'CaloShowerContainer' egrep -a -v 'CaloShowerContainer'
else else
# echo " post.sh> Now comparing output with reference" # echo " post.sh> Now comparing output with reference"
...@@ -111,7 +135,8 @@ select=$2 ...@@ -111,7 +135,8 @@ select=$2
echo " post.sh> ERROR: $joblog and $reflog differ " echo " post.sh> ERROR: $joblog and $reflog differ "
exit 1 exit 1
else else
echo " post.sh> OK: $joblog and $reflog identical " true
#echo " post.sh> OK: $joblog and $reflog identical "
fi fi
else else
tail $joblog tail $joblog
...@@ -127,7 +152,7 @@ select=$2 ...@@ -127,7 +152,7 @@ select=$2
# Check output for ERROR/FATAL # Check output for ERROR/FATAL
joblog=${test}.log joblog=${test}.log
echo #echo
exit $status exit $status
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