Ascendent/run-tests.sh

32 lines
382 B
Bash
Raw Permalink Normal View History

#!/bin/sh
PROGRAM="$(basename $0)"
RESULT=1
print_help() {
/bin/echo -n "$PROGRAM: "
echo "Executes the project test suite under the specified directory"
echo
echo 'Usage:'
echo "$PROGRAM <builddir>"
exit 255
}
if [ $# -ne 1 ]; then
echo "Invalid number of parameters!"
echo
print_help
fi
RUNDIR="$1"
shift
cd $RUNDIR
./app-test
RESULT=$?
cd $OLDPWD
(exit $RESULT)