convert testing infrastructure to tox

This converts the testing infrastructure to tox for both locally
testing and travis. This is nearly equivalent to the previous testing
with the only exception that linting fails with the first tool to fail
and won't process all of them.

Slightly tricky thing is that tox resets *all* of the environment for
it's subprocess runs by default. A couple of the dependencies we have
will not install in non UTF8 locales: temper-python & XBee.
This commit is contained in:
Sean Dague
2016-02-13 19:56:32 -05:00
parent 278033cbf9
commit 97c0f5bb5a
7 changed files with 82 additions and 104 deletions

View File

@@ -1,22 +1,6 @@
# Run style checks
#!/bin/sh
#
# NOTE: all testing is now driven through tox. The tox command below
# performs roughly what this test did in the past.
cd "$(dirname "$0")/.."
echo "Checking style with flake8..."
tput setaf 1
flake8 --exclude www_static homeassistant
FLAKE8_STATUS=$?
tput sgr0
echo "Checking style with pylint..."
tput setaf 1
pylint homeassistant
PYLINT_STATUS=$?
tput sgr0
if [ $FLAKE8_STATUS -eq 0 ]
then
exit $PYLINT_STATUS
else
exit $FLAKE8_STATUS
fi
tox -e lint