Diff of /tests/run_tests.sh [000000] .. [5d12a0]

Switch to unified view

a b/tests/run_tests.sh
1
#!/usr/bin/env bash
2
set -e
3
4
PYCMD=${PYCMD:="python"}
5
COVERAGE=0
6
while [[ "$#" -gt 0 ]]; do
7
    case "$1" in
8
        -p|--python) PYCMD=$2; shift 2 ;;
9
        -c|--coverage) COVERAGE=1; shift 1;;
10
        --) shift; break ;;
11
        *) echo "Invalid argument: $1!" ; exit 1 ;;
12
    esac
13
done
14
15
if [[ $COVERAGE -eq 1 ]]; then
16
    coverage erase
17
    PYCMD="coverage run --parallel-mode --source ants "
18
    echo "coverage flag found. Setting command to: \"$PYCMD\""
19
fi
20
21
pushd "$(dirname "$0")"
22
23
echo "Running core tests"
24
$PYCMD test_core_ants_image.py $@
25
$PYCMD test_core_ants_image_indexing.py $@
26
$PYCMD test_core_ants_image_io.py $@
27
$PYCMD test_core_ants_transform.py $@
28
$PYCMD test_core_ants_transform_io.py $@
29
$PYCMD test_core_ants_metric.py $@
30
31
echo "Running learn tests"
32
$PYCMD test_learn.py $@
33
34
echo "Running registration tests"
35
$PYCMD test_registration.py $@
36
37
echo "Running segmentation tests"
38
$PYCMD test_segmentation.py $@
39
40
echo "Running utils tests"
41
$PYCMD test_utils.py $@
42
43
echo "Running ops tests"
44
$PYCMD test_ops.py $@
45
46
echo "Running plotting tests"
47
$PYCMD test_plotting.py $@
48
49
echo "Running bug tests"
50
$PYCMD test_bugs.py $@
51
52
53
54
if [[ $COVERAGE -eq 1 ]]; then
55
    coverage combine
56
    coverage xml
57
fi
58
59
60
popd