zfs_autobackup/run_tests
Edwin Eefting 499ccc6fd0 test
2020-05-17 14:14:46 +02:00

20 lines
489 B
Bash
Executable File

#!/bin/bash
#reactivate python environment, if any (usefull in Travis)
source $VIRTUAL_ENV/bin/activate || true
# test needs ssh access to localhost for testing
if ! [ -t ~/.ssh/id_rsa ]; then
ssh-keygen -t rsa -f ~/.ssh/id_rsa -P '' || exit 1
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys || exit 1
ssh -oStrictHostKeyChecking=accept-new localhost true || exit 1
fi
coverage run --source bin.zfs_autobackup -m unittest -v $@
EXIT=$?
echo
coverage report
exit $EXIT