hass-core/script/test
Fabian Affolter 058315720f Fix typo
2016-02-10 23:59:34 +01:00

30 lines
510 B
Bash
Executable file

#!/bin/sh
# script/test: Run test suite for application. Optionally 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