1
mirror of https://github.com/home-assistant/core synced 2024-07-12 07:21:24 +02:00
ha-core/script/test
2015-09-20 11:00:35 -07:00

28 lines
422 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")/.."
script/lint
LINT_STATUS=$?
echo "Running tests..."
if [ "$1" = "coverage" ]; then
py.test --cov --cov-report=
TEST_STATUS=$?
else
py.test
TEST_STATUS=$?
fi
if [ $LINT_STATUS -eq 0 ]
then
exit $TEST_STATUS
else
exit $LINT_STATUS
fi