-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathruntests.sh
executable file
·42 lines (30 loc) · 1.19 KB
/
runtests.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#/bin/bash
current_directory=$(pwd)
if [ ! -d report_data ]; then
mkdir -p report_data
fi
if [ ! -e report_data/report_image.png ]; then
wget -P report_data -O report_data/report_image.png https://www.rigshospitalet.dk/SiteCollectionImages/Logo_Rigshospitalet_RGB_54px.png
fi
if [ ! -e report_data/someones_epi.nii.gz ]; then
wget -P report_data -O report_data/someones_epi.nii.gz https://nipy.org/nibabel/_downloads/f76cc5a46e5368e2c779868abc49e497/someones_epi.nii.gz
fi
if [ ! -e report_data/someones_anatomy.nii.gz ]; then
wget -P report_data -O report_data/someones_anatomy.nii.gz https://nipy.org/nibabel/_downloads/c16214e490de2a223655d30f4ba78f15/someones_anatomy.nii.gz
fi
fc-list | grep -q "Mari"
status=$?
if [ $status -eq 0 ]; then
echo "Using Mari font"
export DICOMNODE_ENV_FONT="Mari"
fi
export DICOMNODE_ENV_REPORT_DATA_PATH="$current_directory/report_data/"
# Note that this have approx 6 seconds of overhead :(
# Pretty sure there's something wrong with it's discover algorithm such that
# it takes venv into account.
coverage run runtests.py $@
coverage report --omit=tests/*,venv/*
if [ -d coverage ]; then
mkdir -p coverage
fi
coverage lcov -o coverage/coverage.lcov