test.sh
author Tero Marttila <tero.marttila@aalto.fi>
Tue, 03 Mar 2015 12:43:49 +0200
changeset 720 0b2174b11897
parent 689 c258e3ff6d32
permissions -rwxr-xr-x
lib/pvl/update/zone: reimplement update_zone using pvl.dns-process --include-trace
COVERAGE=opt/bin/coverage
DOCTEST=(
    pvl/dhcp/config.py
    pvl/dns/serial.py
    pvl/dns/labels.py
    pvl/dns/reverse.py
    pvl/dns/generate.py
    pvl/hosts/host.py
)

UNITTEST=(
    pvl.dhcp.tests
    pvl.dns.tests
    pvl.hosts.tests
)

coverage() {
    echo "$ $FUNCNAME $@" >&2

    $COVERAGE "$@"
}

coverage erase

for import in ${UNITTEST[@]}; do
    coverage run -a -m unittest $import
done

for py in ${DOCTEST[@]}; do
    coverage run -a -m doctest $py
done

coverage html \
    --include=pvl/dhcp/*.py,pvl/dns/*.py,pvl/hosts/*.py