31 lines
479 B
Bash
Executable File
31 lines
479 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 --cov --cov-report=
|
|
TEST_STATUS=$?
|
|
else
|
|
py.test
|
|
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
|