core/script/test

28 lines
422 B
Plaintext
Raw Normal View History

2015-09-17 07:38:52 +00:00
#!/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")/.."
2015-09-17 16:08:58 +00:00
script/lint
2015-09-20 18:00:35 +00:00
LINT_STATUS=$?
2015-09-19 19:29:23 +00:00
echo "Running tests..."
2015-01-17 22:32:33 +00:00
if [ "$1" = "coverage" ]; then
2015-09-19 19:29:23 +00:00
py.test --cov --cov-report=
2015-09-20 18:00:35 +00:00
TEST_STATUS=$?
2015-09-19 19:29:23 +00:00
else
py.test
2015-09-20 18:00:35 +00:00
TEST_STATUS=$?
2015-09-19 19:29:23 +00:00
fi
2015-09-20 18:00:35 +00:00
if [ $LINT_STATUS -eq 0 ]
2015-09-19 19:29:23 +00:00
then
2015-09-20 18:00:35 +00:00
exit $TEST_STATUS
else
2015-09-20 18:00:35 +00:00
exit $LINT_STATUS
fi