core/script/test

31 lines
511 B
Bash
Executable File

#!/bin/sh
# script/test: Run test suite for application. Optionallly pass in a path to an
# individual test file to run a single test.
cd "$(dirname "$0")/.."
echo "Running tests..."
if [ "$1" = "coverage" ]; then
py.test -v --timeout=30 --cov --cov-report=
TEST_STATUS=$?
else
py.test -v --timeout=30
TEST_STATUS=$?
fi
if [ "$NO_LINT" = "1" ]; then
LINT_STATUS=0
else
script/lint
LINT_STATUS=$?
fi
if [ $LINT_STATUS -eq 0 ]
then
exit $TEST_STATUS
else
exit $LINT_STATUS
fi