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.
ngcp-panel/t/api-rest/testrunner

34 lines
1.1 KiB

#!/bin/bash
if ! [ -f /.dockerinit ]; then
echo "Not running inside docker, exiting to avoid data damage." >&2
exit 1
fi
set -e
set -u
if [ -z "${1:-}" ] ; then
echo "Usage: $0 <testsystem>" >&2
echo
echo "Usage example: $0 192.168.88.162"
exit 1
fi
SERVER="${1}"
echo "################################################################################"
echo "Finished main setup, now running tests ..."
RC=0
# api-threads.t and api-balanceintervals.t are failing with the "-Pretty option" :(
CATALYST_SERVER="https://${SERVER}:1443" prove -v --color -l -It/lib \
t/api-rest/*.t | tee -a /code/api-rest.pretty || RC=$?
#CATALYST_SERVER="https://${SERVER}:1443" prove --formatter TAP::Formatter::JUnit -l -It/lib t/api-rest/*.t | tee -a /code/api-rest.xml || RC=$?
echo "Finished test execution, test execution returned with exit code ${RC}."
for file in /code/api-rest.pretty /code/api-rest.xml ; do
if [ -f "$file" ] ; then
echo "Test results available at ${file}"
fi
done
echo "################################################################################"