Skip to content

Instantly share code, notes, and snippets.

@nicoe
Created March 29, 2019 10:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicoe/bc7afa457ae06fb66c914d004bdc1b4f to your computer and use it in GitHub Desktop.
Save nicoe/bc7afa457ae06fb66c914d004bdc1b4f to your computer and use it in GitHub Desktop.
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