#!/bin/bash # $HeadURL$ $LastChangedRevision$ PROGNAME=${0##*/} SANDPIT=$(pwd) . $(ade-config ade_share_prefix)/include/adetestsupport.sh ############################################################################## # # LOAD TEST-SPECIFIC CONFIGURATION FILE # ############################################################################## [ "X$ADETEST_MODROOT" != X ] || adetestsupport_error "'ADETEST_MODROOT' not defined" [ -r "$ADETEST_MODROOT/tests/in/$PROGNAME" ] || adetestsupport_error "can't read $ADETEST_MODROOT/tests/in/$PROGNAME" . "$ADETEST_MODROOT/tests/in/$PROGNAME" || adetestsupport_error "problem sourcing $ADETEST_MODROOT/tests/in/$PROGNAME" [ "X$PROGRAMS" != X ] || adetestsupport_error "'PROGRAMS' not defined" ############################################################################## # # START OF TESTS # ############################################################################## # Do not use the OS's native which, it *may* turn /a/b/c/../d into /a/b/d and # that generates inconsistent results. echo "checking programs executed are the right ones ..." adetestsupport_debug 10 "PATH=$PATH" for PROGRAM in $PROGRAMS; do WHICH_PROGRAM=$(type -p $PROGRAM) || true [ "X$WHICH_PROGRAM" = "X$ADETEST_MODROOT/bin/$PROGRAM" -o "X$WHICH_PROGRAM" = "X$ADETEST_MODROOT/sbin/$PROGRAM" ] || adetestsupport_error "would not execute the right version '$PROGRAM'! (should execute '$ADETEST_MODROOT/bin/$PROGRAM', will execute '$(type -p $PROGRAM)'; PATH is $PATH)" done