-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathMakefile.tests
113 lines (101 loc) · 6.59 KB
/
Makefile.tests
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# -*- Makefile -*-
# The test suite no longer runs in parallel, but it ALWAYS tries to run all the
# tests, even without 'make -k'
TESTS := \
test/test-pywrap-functions.py \
test/test-pylib-projections.py \
test/test-cameramodel.py \
test/test-poseutils.py \
test/test-poseutils-lib.py \
test/test-poseutils-near-singularity.py \
test/test-projections.py \
test/test-projection--special-cases.py__pinhole \
test/test-projection--special-cases.py__stereographic \
test/test-projection--special-cases.py__lonlat \
test/test-projection--special-cases.py__latlon \
test/test-gradients.py \
test/test-py-gradients.py \
test/test-cahvor \
test/test-optimizer-callback.py \
test/test-sfm-fixed-points.py \
test/test-sfm-regularization-unity-cam01.py \
test/test-sfm-triangulated-points.py \
test/test-basic-calibration.py \
test/test-surveyed-calibration.py \
test/test-surveyed-calibration.py__--distance__8 \
test/test-surveyed-calibration.py__--oversample__10 \
test/test-surveyed-calibration.py__--do-sample \
test/test-surveyed-calibration.py__--do-sample__--distance__8 \
test/test-surveyed-calibration.py__--do-sample__--oversample__10 \
test/test-projection-uncertainty.py__--fixed__cam0__--model__opencv4__--do-sample \
test/test-projection-uncertainty.py__--fixed__frames__--model__opencv4__--do-sample__--Nsamples__200 \
test/test-projection-uncertainty.py__--fixed__cam0__--model__opencv4__--do-sample__--extra-observation-at__40__--observed-pixel-uncertainty__0.3__--reproject-perturbed__cross-reprojection--rrp-Jfp \
test/test-projection-uncertainty.py__--fixed__cam0__--model__opencv4__--do-sample__--extra-observation-at__40__--observed-pixel-uncertainty__0.03__--reproject-perturbed__cross-reprojection--rrp-Jfp__--points \
test/test-projection-uncertainty.py__--fixed__cam0__--model__opencv4__--do-sample__--reproject-perturbed__bestq__--observed-pixel-uncertainty__0.3__--Nsamples__200 \
test/test-projection-uncertainty.py__--fixed__cam0__--model__splined \
test/test-projection-uncertainty.py__--fixed__cam0__--model__opencv4__--Ncameras__1__--compare-baseline-against-mrcal-2.4 \
test/test-projection-uncertainty.py__--fixed__cam0__--model__opencv4__--Ncameras__4__--compare-baseline-against-mrcal-2.4 \
test/test-linearizations.py \
test/test-lensmodel-string-manipulation \
test/test-CHOLMOD-factorization.py \
test/test-projection-diff.py \
test/test-graft-models.py \
test/test-convert-lensmodel.py \
test/test-stereo.py \
test/test-solvepnp.py \
test/test-match-feature.py \
test/test-triangulation.py \
test/test-uncertainty-broadcasting.py__--q-calibration-stdev__0.3__--q-observation-stdev__0.3__--q-observation-stdev-correlation__0.5 \
test/test-parser-cameramodel \
test/test-extrinsics-moved-since-calibration.py \
test/test-broadcasting.py \
test/test-compute-chessboard-corners-parsing.py \
test/test-rectification-maps.py \
test/test-save-load-image.py \
test/test-worst_direction_stdev.py \
test/test-propagate-calibration-uncertainty.py \
test/test-heap \
test/test-traverse-sensor-links.py
# Check the non-canonical problem definitions
TESTS += \
test/test-projection-uncertainty.py__--fixed__cam0__--model__opencv4__--Ncameras__1__--reproject-perturbed__cross-reprojection--rrp-Jfp \
test/test-projection-uncertainty.py__--fixed__cam0__--model__opencv4__--Ncameras__1__--range-to-boards__4__--non-vanilla \
test/test-projection-uncertainty.py__--fixed__cam0__--model__opencv4__--Ncameras__1__--range-to-boards__4__--non-vanilla__--reproject-perturbed__bestq
# triangulation-uncertainty tests. Lots and lots of tests to exhaustively try
# out different scenarios
BASE := test/test-triangulation-uncertainty.py__--do-sample__--model__opencv4__--observed-point__-40__0__200__--Ncameras__3__--cameras__2__1__--q-observation-stdev-correlation__0.6
TESTS_TRIANGULATION_UNCERTAINTY := \
$(foreach stabilization,__--stabilize-coords NONE, \
$(foreach fixed,cam0 frames, \
$(foreach only,observation calibration, \
$(BASE)$(if $(filter NONE,$(stabilization)),,$(stabilization))__--fixed__$(fixed)__--q-$(only)-stdev__0.5)))
# Both sets of noise. Looking at different camera
BASE := test/test-triangulation-uncertainty.py__--do-sample__--model__opencv4__--Ncameras__2__--cameras__1__0__--q-observation-stdev__0.5__--q-calibration-stdev__0.5
# Different amounts of correlation and near/far
TESTS_TRIANGULATION_UNCERTAINTY := $(TESTS_TRIANGULATION_UNCERTAINTY) \
$(foreach stabilization,__--stabilize-coords NONE, \
$(foreach fixed,cam0 frames, \
$(foreach corr,0.1 0.9, \
$(foreach where,near far, \
$(BASE)$(if $(filter NONE,$(stabilization)),,$(stabilization))__--fixed__$(fixed)__--q-observation-stdev-correlation__$(corr)__--observed-point__$(if $(filter near,$(where)),-2__0__10,-40__0__200)))))
TESTS_external_data := test/test-stereo-range.py
# TESTS_TRIANGULATION_UNCERTAINTY not included in TESTS yet, so TESTS_NOSAMPLING
# includes none of those
TESTS_NOSAMPLING := $(foreach t,$(TESTS),$(if $(filter --do-sample,$(subst __, ,$t)),,$t))
TESTS := $(TESTS) $(TESTS_TRIANGULATION_UNCERTAINTY)
# TESTS_external_data is not included in any other set, and must be requested
# explicitly
# Define the set for each "make test-xxx" command
TESTS_all := $(TESTS)
TESTS_nosampling := $(TESTS_NOSAMPLING)
TESTS_triangulation_uncertainty := $(TESTS_TRIANGULATION_UNCERTAINTY)
# "test-all" is the full set of tests
# "test-nosampling" excludes the very time-consuming tests
# "test-external-data" is everything that needs data other than what's in the repo
TESTS_ALL_TARGETS := test-all test-nosampling test-triangulation-uncertainty test-external-data
$(TESTS_ALL_TARGETS): all
@FAILED=""; $(foreach t,$(TESTS_$(subst -,_,$(patsubst test-%,%,$@))),echo "========== RUNNING: $(subst __, ,$t)"; $(subst __, ,$t) || FAILED="$$FAILED $t"; ) test -z "$$FAILED" || echo "SOME TEST SETS FAILED: $$FAILED !"; test -z "$$FAILED" && echo "ALL TEST SETS PASSED!"
.PHONY: $(TESTS_ALL_TARGETS)
test:
@echo "Which test set should we run? I know about '$(TESTS_ALL_TARGETS)'" >> /dev/stderr; false
.PHONY: test