mirror of
https://github.com/psy0rz/zfs_autobackup.git
synced 2025-04-11 22:40:01 +03:00
30 lines
595 B
Bash
Executable File
30 lines
595 B
Bash
Executable File
#!/bin/bash
|
|
|
|
SCRIPTDIR=`dirname $0`
|
|
|
|
#cd $SCRIPTDIR || exit 1
|
|
|
|
|
|
if [ "$USER" != "root" ]; then
|
|
echo "Need root to do proper zfs testing"
|
|
exit 1
|
|
fi
|
|
|
|
|
|
# test needs ssh access to localhost for testing
|
|
if ! [ -e /root/.ssh/id_rsa ]; then
|
|
ssh-keygen -t rsa -f /root/.ssh/id_rsa -P '' || exit 1
|
|
cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys || exit 1
|
|
ssh -oStrictHostKeyChecking=no localhost true || exit 1
|
|
fi
|
|
|
|
umount /tmp/ZfsCheck*
|
|
|
|
coverage run --branch --source zfs_autobackup -m unittest discover -vvvvf $SCRIPTDIR $@ 2>&1
|
|
EXIT=$?
|
|
|
|
echo
|
|
coverage report
|
|
|
|
exit $EXIT
|