diff --git a/.gitattributes b/.gitattributes index 30a9f9311c220aa948db39056a14cfa283f41a71..4ffff5aa740b3a4711c917200d2dcf7d7bb68966 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4853,8 +4853,8 @@ SAS/OTDB/test/tBrokenHardware.cc -text SAS/OTDB/test/tMetadata.cc -text SAS/OTDB/test/tQueryPIC.cc -text SAS/OTDB/test/t_getTreeGroup.py -text -SAS/OTDB/test/t_getTreeGroup.run -text svneol=unset#application/x-shellscript -SAS/OTDB/test/t_getTreeGroup.sh -text svneol=unset#application/x-shellscript +SAS/OTDB/test/t_getTreeGroup.run -text +SAS/OTDB/test/t_getTreeGroup.sh -text SAS/OTDB/test/unittest_db.dump.gz -text svneol=unset#application/x-gzip SAS/OTDB_Services/CMakeLists.txt -text SAS/OTDB_Services/TreeService.py -text diff --git a/SAS/OTDB/test/t_getTreeGroup.run b/SAS/OTDB/test/t_getTreeGroup.run index 957d73c952a8448bdc0ebcd22e5038a34df9343a..7bb6837d69704add9b60f717da2b5f615967e641 100755 --- a/SAS/OTDB/test/t_getTreeGroup.run +++ b/SAS/OTDB/test/t_getTreeGroup.run @@ -2,6 +2,16 @@ # constants DBHOST=sas099.control.lofar +# This test requires Python 2.7+ +python -c 'import sys, os; sys.exit(1 - int(sys.version >= "2.7"))' || exit 3 + +# This test requires access to DBHOST +ping -w 1 -c 1 $DBHOST || exit 3 + +# This test requires PostGres tooling +which dropdb || exit 3 +which psql || exit 3 + # Setup a clean database with predefined content dropdb -U postgres -h ${DBHOST} unittest_db gzip -dc $srcdir/unittest_db.dump.gz | psql -U postgres -h ${DBHOST} -f -