3 |
|
# Render and primitive type testing |
4 |
|
# |
5 |
|
|
6 |
< |
# Number of processes to use on tests that test multi-core |
7 |
< |
NPROC = 2 |
6 |
> |
# Number of processes to use on tests that run multi-core |
7 |
> |
ifeq ($(OS),Windows_NT) # is Windows |
8 |
> |
NPROC := 1 |
9 |
> |
else |
10 |
> |
NPROC := 2 |
11 |
> |
endif |
12 |
|
|
13 |
|
# Image reduction for comparisons |
14 |
|
RDU_PFILT = pfilt -1 -r 1 -x 128 -y 128 -pa 1 |
15 |
|
|
16 |
|
# Image comparison command |
17 |
< |
IMG_CMP = radcompare -rms 0.07 -max 1.5 |
17 |
> |
IMG_CMP = radcompare -rel 0.007 -rms 0.1 -max 1.5 |
18 |
|
|
19 |
|
# Default target is to test everything |
20 |
< |
all: test-xform test-oconv test-rad test-rfluxmtx \ |
20 |
> |
all: test-xform test-oconv test-rad test-rfluxmtx test-rpiece \ |
21 |
> |
test-rpict test-mkpmap \ |
22 |
> |
test-trans2-def test-trans2-fish test-trans2-win \ |
23 |
|
test-mixtex-def test-mixtex-fish test-mixtex-plan test-mixtex-rplan \ |
18 |
– |
test-trans2-def test-trans2-fish test-dielectric-def \ |
19 |
– |
test-dielectric-fish test-glass-def test-glass-fish test-glass-up \ |
24 |
|
test-tfunc-def test-tfunc-fish test-inst-def test-inst-fish \ |
25 |
< |
test-mesh-def test-mesh-cyl test-mirror-fish test-mist-def \ |
26 |
< |
test-trans-def test-trans-fish test-patterns-def test-patterns-plan \ |
27 |
< |
test-rtrace |
25 |
> |
test-mesh-def test-mesh-cyl test-mesh-cyl2 test-mist-def \ |
26 |
> |
test-dielectric-def test-dielectric-fish test-trans-def \ |
27 |
> |
test-glass-def test-glass-fish test-glass-up \ |
28 |
> |
test-trans-fish test-patterns-def test-patterns-plan \ |
29 |
> |
test-rtrace test-mirror-fish test-obj2mesh \ |
30 |
> |
test-prism1-fish test-prism2-fish test-spectra-fish |
31 |
|
|
32 |
|
clean: |
33 |
|
rm -f *.oct *.amb *_ill.dat blinds_ill?.dat *_*.hdr *.unf \ |
34 |
|
*.[cg]pm{,.leaf} inst_rad.txt combined.rad rfmirror.mtx |
35 |
|
|
36 |
+ |
###### |
37 |
+ |
# More-or-less evenly divided batches for NPROC=1 (redundancies removed) |
38 |
+ |
|
39 |
+ |
batch1: test-mixtex-def test-mixtex-fish test-mixtex-plan test-mixtex-rplan \ |
40 |
+ |
test-xform test-oconv test-rad test-obj2mesh |
41 |
+ |
|
42 |
+ |
batch2: test-rfluxmtx test-mist-def test-glass-def test-glass-fish test-glass-up \ |
43 |
+ |
test-spectra-fish |
44 |
+ |
|
45 |
+ |
batch3: test-inst-def test-inst-fish test-trans2-def test-trans2-fish test-trans2-win \ |
46 |
+ |
test-dielectric-def test-dielectric-fish |
47 |
+ |
|
48 |
+ |
batch4: test-rtrace test-prism1-fish test-prism2-fish test-mirror-fish \ |
49 |
+ |
test-mesh-def test-mesh-cyl test-mesh-cyl2 test-tfunc-def test-tfunc-fish \ |
50 |
+ |
test-trans-def test-trans-fish test-patterns-def test-patterns-plan |
51 |
+ |
|
52 |
+ |
### Test Aliases ### |
53 |
+ |
|
54 |
+ |
test-rpict: test-mirror-fish |
55 |
+ |
|
56 |
+ |
test-rpiece test-mkpmap: test-mixtex-def |
57 |
+ |
|
58 |
|
### Special test of xform ### |
59 |
|
|
60 |
< |
test-xform: combined_scene.rad |
61 |
< |
xform -f combined_scene.rad | grep -v '^[ ]*#' > combined.rad |
33 |
< |
radcompare -max 0.04 ref/combined.rad combined.rad |
60 |
> |
test-xform: combined.rad |
61 |
> |
radcompare "-c#" -max 0.04 ref/combined.rad combined.rad |
62 |
|
|
63 |
+ |
combined.rad: combined_scene.rad |
64 |
+ |
xform -f combined_scene.rad > combined.rad |
65 |
+ |
|
66 |
|
### Special test of rad ### |
67 |
|
|
68 |
< |
test-rad: inst.rif |
68 |
> |
test-rad: inst.oct |
69 |
|
rad -n -s -e inst.rif > inst_rad.txt |
70 |
|
radcompare ref/inst_rad.txt inst_rad.txt |
71 |
|
|
72 |
< |
### Special test of oconv ### |
72 |
> |
### Special tests of oconv and obj2mesh ### |
73 |
|
|
74 |
|
test-oconv: inst.oct |
75 |
|
radcompare ref/inst.oct inst.oct |
76 |
|
|
77 |
+ |
test-obj2mesh: cab.obj |
78 |
+ |
obj2mesh -w cab.obj | radcompare ref/cab.rtm - |
79 |
+ |
|
80 |
|
### Special test of rtrace ### |
81 |
|
|
82 |
< |
test-rtrace: ref/mirror_fish.hdr rtmirror_fish.hdr |
82 |
> |
test-rtrace: ref/mirror_fish.hdr rtmirror_fish.hdr |
83 |
|
$(RDU_PFILT) rtmirror_fish.hdr | $(IMG_CMP) -h ref/mirror_fish.hdr - |
84 |
|
|
85 |
|
rtmirror_fish.hdr: mirror.oct |
86 |
|
rad -v 0 mirror.rif OPT=mirror.opt |
87 |
< |
vwrays -ff -vf fish.vf -x 2048 -y 2048 | rtrace -n $(NPROC) @mirror.opt \ |
88 |
< |
-ffc -x 2048 -y 2048 mirror.oct | pfilt -1 -e +3 -r .6 -x /2 -y /2 \ |
87 |
> |
vwrays -ff -vf fish.vf -x 2048 -y 1991 | rtrace -n $(NPROC) @mirror.opt \ |
88 |
> |
-ffc -x 2048 -y 1991 mirror.oct | pfilt -1 -e +3 -r .6 -x /2 -y /2 \ |
89 |
|
> rtmirror_fish.hdr |
90 |
|
rm -f mirror.opt |
91 |
|
|
92 |
|
### Special test for rfluxmtx (and rcontrib) ### |
93 |
|
|
94 |
|
test-rfluxmtx: ref/rfmirror.mtx rfmirror.mtx |
95 |
< |
radcompare -max .4 -rms .05 ref/rfmirror.mtx rfmirror.mtx |
95 |
> |
radcompare -max .4 -rms .05 -rel 1e-4 ref/rfmirror.mtx rfmirror.mtx |
96 |
|
|
97 |
|
rfmirror.mtx: mirror.rad dummysky.rad basic.mat diorama_walls.rad \ |
98 |
|
closed_end.rad front_cap.rad glass_pane.rad antimatter_portal.rad |
279 |
|
|
280 |
|
### End mirror-fish tests |
281 |
|
|
248 |
– |
### Octree for mist ### |
249 |
– |
|
250 |
– |
mist.oct: mist.rif |
251 |
– |
rad -v 0 mist.rif |
252 |
– |
|
282 |
|
### Reference and test for mist view def ### |
283 |
|
|
284 |
|
test-mist-def: ref/mist_def.hdr mist_def.hdr |
288 |
|
make mist_def.hdr |
289 |
|
$(RDU_PFILT) mist_def.hdr > ref/mist_def.hdr |
290 |
|
|
291 |
< |
mist_def.hdr: mist.oct |
292 |
< |
rad -v def mist.rif |
291 |
> |
mist_def.hdr: mist.rif |
292 |
> |
rad -N $(NPROC) mist.rif |
293 |
|
|
294 |
|
### End mist-def tests |
295 |
|
|
333 |
|
|
334 |
|
### Octree for tfunc ### |
335 |
|
|
336 |
< |
tfunc.oct: tfunc.rif |
336 |
> |
tfunc1.oct: tfunc.rif |
337 |
|
rad -v 0 tfunc.rif |
338 |
|
|
339 |
|
### Reference and test for tfunc view def ### |
345 |
|
make tfunc_def.hdr |
346 |
|
$(RDU_PFILT) tfunc_def.hdr > ref/tfunc_def.hdr |
347 |
|
|
348 |
< |
tfunc_def.hdr: tfunc.oct |
348 |
> |
tfunc_def.hdr: tfunc1.oct |
349 |
|
rad -v def tfunc.rif |
350 |
|
|
351 |
|
### End tfunc-def tests |
359 |
|
make tfunc_fish.hdr |
360 |
|
$(RDU_PFILT) tfunc_fish.hdr > ref/tfunc_fish.hdr |
361 |
|
|
362 |
< |
tfunc_fish.hdr: tfunc.oct |
362 |
> |
tfunc_fish.hdr: tfunc1.oct |
363 |
|
rad -v fish tfunc.rif |
364 |
|
|
365 |
|
### End tfunc-fish tests |
399 |
|
|
400 |
|
### Octree for trans2 ### |
401 |
|
|
402 |
< |
trans2.oct: trans2.rif |
402 |
> |
trans21.oct: trans2.rif |
403 |
|
rad -v 0 trans2.rif |
404 |
|
|
405 |
|
### Reference and test for trans2 view def ### |
411 |
|
make trans2_def.hdr |
412 |
|
$(RDU_PFILT) trans2_def.hdr > ref/trans2_def.hdr |
413 |
|
|
414 |
< |
trans2_def.hdr: trans2.oct |
414 |
> |
trans2_def.hdr: trans21.oct |
415 |
|
rad -v def trans2.rif |
416 |
|
|
417 |
|
### End trans2-def tests |
425 |
|
make trans2_fish.hdr |
426 |
|
$(RDU_PFILT) trans2_fish.hdr > ref/trans2_fish.hdr |
427 |
|
|
428 |
< |
trans2_fish.hdr: trans2.oct |
428 |
> |
trans2_fish.hdr: trans21.oct |
429 |
|
rad -v fish trans2.rif |
430 |
|
|
431 |
|
### End trans2-fish tests |
439 |
|
make trans2_win.hdr |
440 |
|
$(RDU_PFILT) trans2_win.hdr > ref/trans2_win.hdr |
441 |
|
|
442 |
< |
trans2_win.hdr: trans2.oct |
442 |
> |
trans2_win.hdr: trans21.oct |
443 |
|
rad -v win trans2.rif |
444 |
|
|
445 |
|
### End trans2-win tests |
480 |
|
### Octree for mixtex ### |
481 |
|
|
482 |
|
mixtex.oct: mixtex.rif |
483 |
< |
rad -v 0 mixtex.rif |
483 |
> |
rad -v 0 -N $(NPROC) mixtex.rif |
484 |
|
|
485 |
|
### Reference and test for mixtex view def ### |
486 |
|
|
492 |
|
$(RDU_PFILT) mixtex_def.hdr > ref/mixtex_def.hdr |
493 |
|
|
494 |
|
mixtex_def.hdr: mixtex.oct |
495 |
< |
rad -v def mixtex.rif |
495 |
> |
rad -v def -N $(NPROC) mixtex.rif |
496 |
|
|
497 |
|
### End mixtex-def tests |
498 |
|
|
537 |
|
rad -v rplan mixtex.rif |
538 |
|
|
539 |
|
### End mixtex-rplan tests |
540 |
+ |
|
541 |
+ |
### Octree for spectra |
542 |
+ |
|
543 |
+ |
spectra.oct: spectra.rif |
544 |
+ |
rad -v 0 spectra.rif |
545 |
+ |
|
546 |
+ |
### Reference and test for spectra fish ### |
547 |
+ |
|
548 |
+ |
test-spectra-fish: ref/spectra_fish.hdr spectra_fish.hdr |
549 |
+ |
$(RDU_PFILT) spectra_fish.hdr | $(IMG_CMP) ref/spectra_fish.hdr - |
550 |
+ |
|
551 |
+ |
ref/spectra_fish.hdr: |
552 |
+ |
make spectra_fish.hdr |
553 |
+ |
$(RDU_PFILT) spectra_fish.hdr > ref/spectra_fish.hdr |
554 |
+ |
|
555 |
+ |
spectra_fish.hdr: spectra.oct |
556 |
+ |
rad -v fish spectra.rif |
557 |
+ |
|
558 |
+ |
### End spectra-fish tests |