Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Script to run tryton tests
#!/usr/bin/zsh
if [ -z $VIRTUAL_ENV ]; then
echo 'Set a virtualenv first!'
exit 1
fi
source $VIRTUAL_ENV/bin/activate
TRYTOND_CONFIG=$HOME/.trytond_test.conf PYTHONPATH=$PWD/proteus:$PWD/trytond ./trytond/trytond/tests/run-tests.py $*;
RETURN_CODE=$?
if [ $RETURN_CODE -eq 0 ]; then
/usr/bin/notify-send "Test finished!";
else
/usr/bin/notify-send -u critical -i error "Test failed!";
fi
exit $RETURN_CODE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment