You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
system-tests/testrunner

26 lines
495 B

#!/bin/bash
REPORT_DIRECTORY='reports/'
if [ $# -lt 1 ] ; then
echo "Usage: $0 </path/to/test/directory/>" >&2
echo
echo "Usage example: $0 /usr/share/ngcp-tests/ce/"
exit 1
fi
if ! [ -d "$1" ] ; then
echo "$1 is not a directory" >&2
exit 1
fi
rm -rf "${REPORT_DIRECTORY}"
mkdir "${REPORT_DIRECTORY}"
for test in ${1}/*.t ; do
perl "$test" > "${REPORT_DIRECTORY}/$(basename ${test}).tap" 2>&1
done
tar acf reports.tar.gz "${REPORT_DIRECTORY}"
echo "Generated reports.tar.gz"