Skip to content
Snippets Groups Projects
Commit 27811990 authored by scott snyder's avatar scott snyder
Browse files

AthenaPoolUtilities, RecAthenaPool: Allow skipping tests if required libraries aren't present.

Synchonize with 21.2:

Some *AthenaPool tests are failing in AthDerivation because they require
libraries that aren't present in the build.  For example, RecAthenaPool
is failing because JetEventAthenaPool isn't included.  In this case,
we end up having to add a fair number of libraries to the build
in order to get it to work --- probably more than we'd like to.

So extend the cmake_parse_arguments macro to take a REQUIRED_LIBARARIES
argument.  If any of the libraries listed here are not found
on LD_LIBRARY_PATH, then the test is skipped.

Use this in RecAthenaPool.


Former-commit-id: 71ff378c73757fe155ff4dd765c5c36638d3ea68
parent 48783569
No related branches found
No related tags found
No related merge requests found
......@@ -14,7 +14,7 @@
function( run_tpcnv_test testName refName )
cmake_parse_arguments( ARG "" "REFERENCE_TAG" "" ${ARGN} )
cmake_parse_arguments( ARG "" "REFERENCE_TAG" "REQUIRED_LIBRARIES" ${ARGN} )
# The package name is needed for the configuration of the test script:
atlas_get_package_name( pkgName )
......
......@@ -236,7 +236,9 @@ if [ -z "$testStatus" ]; then
else
# check exit status
joblog=${test}.log
if [ "$testStatus" = 0 ]; then
if [ -r ${test}-SKIPPED ]; then
echo "WARNING: Test skipped because required libraries are not available."
elif [ "$testStatus" = 0 ]; then
reflog=../../share/${test}.ref
if [ ! -r $reflog ]; then
reflog=../share/${test}.ref
......
#!/bin/sh
for libroot in @ARG_REQUIRED_LIBRARIES@; do
fullpath=""
for p in `echo $LD_LIBRARY_PATH | tr : ' ' `; do
if [ -r $p/lib${libroot}.so ]; then
fullpath="$p/lib${libroot}.so"
fi
done
if [ "$fullpath" = "" ]; then
echo "WARNING: Library $libroot not found; skipping test @testName@"
# Signal post_tpcnvtest.sh to skip the reffile comparison.
touch @testName@-SKIPPED
exit 0
fi
done
rm -f @testName@-SKIPPED
reffile=`echo @CMAKE_CURRENT_SOURCE_DIR@/share/@refName@.pool.root*.ref`
if [ -f "$reffile" ] &&
[ "@CMAKE_CURRENT_SOURCE_DIR@" != "@CMAKE_CURRENT_BINARY_DIR@" ]; then
......
......@@ -42,12 +42,16 @@ if( ATHENAPOOLUTILITIESTEST_FOUND )
set( RECATHENAPOOL_REFERENCE_TAG
RecAthenaPoolReference-01-00-00 )
run_tpcnv_test( RecTPCnv_15.0.0 AOD-15.0.0-full
REQUIRED_LIBRARIES JetEventAthenaPoolPoolCnv
REFERENCE_TAG ${RECATHENAPOOL_REFERENCE_TAG} )
run_tpcnv_test( RecTPCnv_15.6.1 AOD-15.6.1-full
REQUIRED_LIBRARIES JetEventAthenaPoolPoolCnv
REFERENCE_TAG ${RECATHENAPOOL_REFERENCE_TAG} )
run_tpcnv_test( RecTPCnv_17.0.6 AOD-17.0.6-full
REQUIRED_LIBRARIES JetEventAthenaPoolPoolCnv
REFERENCE_TAG ${RECATHENAPOOL_REFERENCE_TAG} )
run_tpcnv_test( RecTPCnv_18.0.0 AOD-18.0.0-full
REQUIRED_LIBRARIES JetEventAthenaPoolPoolCnv
REFERENCE_TAG ${RECATHENAPOOL_REFERENCE_TAG} )
else()
message( WARNING "Couldn't find AthenaPoolUtilitiesTest. No test(s) set up." )
......
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