#!/bin/bash
# TODO: stash changes before doing tests: http://codeinthehole.com/writing/tips-for-using-a-git-pre-commit-hook/

EXITCODE=0

function handle_exit {
    if [ $? -ne 0 ]; then
        EXITCODE=1
    fi
}

echo '====== Running tests ========='
bin/nosetests $@; handle_exit

echo '====== Running flake8 ======'
bin/flake8 *.py; handle_exit
bin/flake8 mrbob; handle_exit

if [ $EXITCODE -ne 0 ]; then
    exit 1
fi

#!/bin/bash
# TODO: stash changes before doing tests: http://codeinthehole.com/writing/tips-for-using-a-git-pre-commit-hook/

EXITCODE=0

function handle_exit {
    if [ $? -ne 0 ]; then
        EXITCODE=1
    fi
}

echo '====== Running tests ========='
nosetests $@; handle_exit

echo '====== Running flake8 ======'
flake8 *.py; handle_exit
flake8 mrbob; handle_exit

if [ $EXITCODE -ne 0 ]; then
    exit 1
fi

Revert "run tests inside venv"
Revert "run tests inside venv"

This reverts commit a5077b5bf2dbb94c6bc8d178a86896017e1635f4.
