-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
76 lines (52 loc) · 1.99 KB
/
Makefile
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
SHELL := /usr/bin/env bash
export ORC_MAIN_PORT ?= 8028
export ORC_PEER_PORT ?= 8029
export ORC_MODALITY_ONE_PORT ?= 8021
export ORC_MODALITY_TWO_PORT ?= 8022
export ORC_MAIN_ADDRESS ?= http://localhost:${ORC_MAIN_PORT}
export ORC_PEER_ADDRESS ?= http://localhost:${ORC_PEER_PORT}
export ORC_MODALITY_ONE_ADDRESS ?= http://localhost:${ORC_MODALITY_ONE_PORT}
export ORC_MODALITY_TWO_ADDRESS ?= http://localhost:${ORC_MODALITY_TWO_PORT}
export ORC_ORTHANC_USERNAME ?= orthanc
export ORC_ORTHANC_PASSWORD ?= orthanc
export ORC_DATAFILES_PATH ?= ./tests/data/dicom
export DINO_SCP_HOST ?= 0.0.0.0
export DINO_SCP_PORT ?= 5252
export DINO_SCP_AET ?= DINO
build:
cargo build
doc:
cargo doc --no-deps
serve_doc: doc
python -m http.server -b 127.0.0.1 -d target/doc 9001
clean: cleanup_orthanc stop_services
cargo clean
test: unit_test integration_test e2e_test
unit_test:
cargo test --lib -- --show-output ${TEST}
integration_test:
cargo test --test client -- --show-output ${TEST}
e2e_test: reset_orthanc
cargo test --test e2e -- --test-threads=1 --show-output ${TEST}
unit_test_coverage: install_tarpaulin_HEAD
cargo tarpaulin --lib --verbose --ignore-tests --all-features --workspace --timeout 120 --out Xml
integration_test_coverage: install_tarpaulin_HEAD
cargo tarpaulin --test client --verbose --ignore-tests --all-features --workspace --timeout 120 --out Xml
e2e_test_coverage: install_tarpaulin_HEAD reset_orthanc
cargo tarpaulin --test e2e --verbose --ignore-tests --all-features --workspace --timeout 120 --out Xml -- --test-threads=1
install_tarpaulin:
cargo install --version 0.16.0 cargo-tarpaulin
install_tarpaulin_HEAD:
cargo install --git https://github.com/xd009642/tarpaulin.git --branch develop cargo-tarpaulin
cleanup_orthanc:
./scripts/cleanup_orthanc.sh
populate_orthanc:
./scripts/populate_orthanc.sh
reset_orthanc: cleanup_orthanc populate_orthanc
start_services:
docker-compose pull
docker-compose up -d
stop_services:
docker-compose down
release:
cargo release ${VERSION}