Files
core/script/test
T

31 lines
510 B
Bash
Raw Normal View History

2015-09-17 00:38:52 -07:00
#!/bin/sh
2016-02-10 23:59:34 +01:00
# script/test: Run test suite for application. Optionally pass in a path to an
2015-09-17 00:38:52 -07:00
# individual test file to run a single test.
2015-09-17 00:35:26 -07:00
cd "$(dirname "$0")/.."
echo "Running tests..."
2015-01-17 14:32:33 -08:00
2015-04-28 19:12:05 -07:00
if [ "$1" = "coverage" ]; then
2016-02-03 15:12:09 -05:00
py.test -v --timeout=30 --cov --cov-report=
2015-09-20 11:00:35 -07:00
TEST_STATUS=$?
2015-04-28 19:12:05 -07:00
else
2016-02-03 15:12:09 -05:00
py.test -v --timeout=30
2015-09-20 11:00:35 -07:00
TEST_STATUS=$?
2015-09-19 12:29:23 -07:00
fi
2016-01-02 14:23:12 -08:00
if [ "$NO_LINT" = "1" ]; then
LINT_STATUS=0
else
script/lint
LINT_STATUS=$?
fi
2015-09-20 11:00:35 -07:00
if [ $LINT_STATUS -eq 0 ]
2015-09-19 12:29:23 -07:00
then
2015-09-20 11:00:35 -07:00
exit $TEST_STATUS
2015-09-19 12:29:23 -07:00
else
2015-09-20 11:00:35 -07:00
exit $LINT_STATUS
2015-04-28 19:12:05 -07:00
fi