3 |
|
# Render and primitive type testing |
4 |
|
# |
5 |
|
|
6 |
+ |
# Number of processes to use on tests that run multi-core |
7 |
+ |
NPROC = 2 |
8 |
+ |
|
9 |
|
# Image reduction for comparisons |
10 |
|
RDU_PFILT = pfilt -1 -r 1 -x 128 -y 128 -pa 1 |
11 |
|
|
12 |
|
# Image comparison command |
13 |
< |
IMG_CMP = radcompare -rms 0.08 -max 1.5 |
13 |
> |
IMG_CMP = radcompare -rms 0.07 -max 1.5 |
14 |
|
|
15 |
|
# Default target is to test everything |
16 |
< |
all: test-dielectric-def test-dielectric-fish test-glass-def \ |
17 |
< |
test-glass-fish test-glass-up test-inst-def test-inst-fish \ |
16 |
> |
all: test-xform test-oconv test-rad test-rfluxmtx test-rpiece \ |
17 |
> |
test-rpict test-mkpmap \ |
18 |
> |
test-mixtex-def test-mixtex-fish test-mixtex-plan test-mixtex-rplan \ |
19 |
> |
test-trans2-def test-trans2-fish test-dielectric-def \ |
20 |
> |
test-dielectric-fish test-glass-def test-glass-fish test-glass-up \ |
21 |
> |
test-tfunc-def test-tfunc-fish test-inst-def test-inst-fish \ |
22 |
|
test-mesh-def test-mesh-cyl test-mirror-fish test-mist-def \ |
23 |
< |
test-tfunc-def test-tfunc-fish test-trans-def test-trans-fish \ |
24 |
< |
test-trans2-def test-trans2-fish |
23 |
> |
test-trans-def test-trans-fish test-patterns-def test-patterns-plan \ |
24 |
> |
test-rtrace test-obj2mesh |
25 |
|
|
26 |
|
clean: |
27 |
< |
rm -f *.oct *.amb *_ill.dat *_*.hdr *.unf combined.rad |
27 |
> |
rm -f *.oct *.amb *_ill.dat blinds_ill?.dat *_*.hdr *.unf \ |
28 |
> |
*.[cg]pm{,.leaf} inst_rad.txt combined.rad rfmirror.mtx |
29 |
|
|
30 |
< |
# Special test of xform |
30 |
> |
### Test Aliases ### |
31 |
|
|
32 |
< |
test-xform: combined_scene.rad |
25 |
< |
xform -f combined_scene.rad | grep -v '^[ ]*#' > combined.rad |
26 |
< |
radcompare ref/combined.rad combined.rad |
32 |
> |
test-rpict: test-mirror-fish |
33 |
|
|
34 |
+ |
test-rpiece test-mkpmap: test-mixtex-def |
35 |
+ |
|
36 |
+ |
### Special test of xform ### |
37 |
+ |
|
38 |
+ |
test-xform: combined.rad |
39 |
+ |
radcompare "-c#" -max 0.04 ref/combined.rad combined.rad |
40 |
+ |
|
41 |
+ |
combined.rad: combined_scene.rad |
42 |
+ |
xform -f combined_scene.rad > combined.rad |
43 |
+ |
|
44 |
+ |
### Special test of rad ### |
45 |
+ |
|
46 |
+ |
test-rad: inst.oct |
47 |
+ |
rad -n -s -e inst.rif > inst_rad.txt |
48 |
+ |
radcompare ref/inst_rad.txt inst_rad.txt |
49 |
+ |
|
50 |
+ |
### Special tests of oconv and obj2mesh ### |
51 |
+ |
|
52 |
+ |
test-oconv: inst.oct |
53 |
+ |
radcompare ref/inst.oct inst.oct |
54 |
+ |
|
55 |
+ |
test-obj2mesh: cab.obj |
56 |
+ |
obj2mesh -w cab.obj | radcompare ref/cab.rtm - |
57 |
+ |
|
58 |
+ |
### Special test of rtrace ### |
59 |
+ |
|
60 |
+ |
test-rtrace: ref/mirror_fish.hdr rtmirror_fish.hdr |
61 |
+ |
$(RDU_PFILT) rtmirror_fish.hdr | $(IMG_CMP) -h ref/mirror_fish.hdr - |
62 |
+ |
|
63 |
+ |
rtmirror_fish.hdr: mirror.oct |
64 |
+ |
rad -v 0 mirror.rif OPT=mirror.opt |
65 |
+ |
vwrays -ff -vf fish.vf -x 2048 -y 2048 | rtrace -n $(NPROC) @mirror.opt \ |
66 |
+ |
-ffc -x 2048 -y 2048 mirror.oct | pfilt -1 -e +3 -r .6 -x /2 -y /2 \ |
67 |
+ |
> rtmirror_fish.hdr |
68 |
+ |
rm -f mirror.opt |
69 |
+ |
|
70 |
+ |
### Special test for rfluxmtx (and rcontrib) ### |
71 |
+ |
|
72 |
+ |
test-rfluxmtx: ref/rfmirror.mtx rfmirror.mtx |
73 |
+ |
radcompare -max .4 -rms .05 -rel 1e-4 ref/rfmirror.mtx rfmirror.mtx |
74 |
+ |
|
75 |
+ |
rfmirror.mtx: mirror.rad dummysky.rad basic.mat diorama_walls.rad \ |
76 |
+ |
closed_end.rad front_cap.rad glass_pane.rad antimatter_portal.rad |
77 |
+ |
rfluxmtx -n $(NPROC) -ab 2 -lw 1e-4 mirror.rad dummysky.rad \ |
78 |
+ |
basic.mat diorama_walls.rad closed_end.rad front_cap.rad \ |
79 |
+ |
glass_pane.rad antimatter_portal.rad > rfmirror.mtx |
80 |
+ |
|
81 |
|
### Octree for dielectric ### |
82 |
|
|
83 |
|
dielectric.oct: dielectric.rif |
257 |
|
|
258 |
|
### End mirror-fish tests |
259 |
|
|
207 |
– |
### Octree for mist ### |
208 |
– |
|
209 |
– |
mist.oct: mist.rif |
210 |
– |
rad -v 0 mist.rif |
211 |
– |
|
260 |
|
### Reference and test for mist view def ### |
261 |
|
|
262 |
|
test-mist-def: ref/mist_def.hdr mist_def.hdr |
266 |
|
make mist_def.hdr |
267 |
|
$(RDU_PFILT) mist_def.hdr > ref/mist_def.hdr |
268 |
|
|
269 |
< |
mist_def.hdr: mist.oct |
270 |
< |
rad -v def mist.rif |
269 |
> |
mist_def.hdr: mist.rif |
270 |
> |
rad -N $(NPROC) mist.rif |
271 |
|
|
272 |
|
### End mist-def tests |
273 |
|
|
311 |
|
|
312 |
|
### Octree for tfunc ### |
313 |
|
|
314 |
< |
tfunc.oct: tfunc.rif |
314 |
> |
tfunc1.oct: tfunc.rif |
315 |
|
rad -v 0 tfunc.rif |
316 |
|
|
317 |
|
### Reference and test for tfunc view def ### |
323 |
|
make tfunc_def.hdr |
324 |
|
$(RDU_PFILT) tfunc_def.hdr > ref/tfunc_def.hdr |
325 |
|
|
326 |
< |
tfunc_def.hdr: tfunc.oct |
326 |
> |
tfunc_def.hdr: tfunc1.oct |
327 |
|
rad -v def tfunc.rif |
328 |
|
|
329 |
|
### End tfunc-def tests |
337 |
|
make tfunc_fish.hdr |
338 |
|
$(RDU_PFILT) tfunc_fish.hdr > ref/tfunc_fish.hdr |
339 |
|
|
340 |
< |
tfunc_fish.hdr: tfunc.oct |
340 |
> |
tfunc_fish.hdr: tfunc1.oct |
341 |
|
rad -v fish tfunc.rif |
342 |
|
|
343 |
|
### End tfunc-fish tests |
421 |
|
rad -v win trans2.rif |
422 |
|
|
423 |
|
### End trans2-win tests |
424 |
+ |
|
425 |
+ |
### Octree for patterns ### |
426 |
+ |
|
427 |
+ |
patterns.oct: patterns.rif |
428 |
+ |
rad -v 0 patterns.rif |
429 |
+ |
|
430 |
+ |
### Reference and test for patterns view def ### |
431 |
+ |
|
432 |
+ |
test-patterns-def: ref/patterns_def.hdr patterns_def.hdr |
433 |
+ |
$(RDU_PFILT) patterns_def.hdr | $(IMG_CMP) ref/patterns_def.hdr - |
434 |
+ |
|
435 |
+ |
ref/patterns_def.hdr: |
436 |
+ |
make patterns_def.hdr |
437 |
+ |
$(RDU_PFILT) patterns_def.hdr > ref/patterns_def.hdr |
438 |
+ |
|
439 |
+ |
patterns_def.hdr: patterns.oct |
440 |
+ |
rad -v def patterns.rif |
441 |
+ |
|
442 |
+ |
### End patterns-def tests |
443 |
+ |
|
444 |
+ |
### Reference and test for patterns view plan ### |
445 |
+ |
|
446 |
+ |
test-patterns-plan: ref/patterns_plan.hdr patterns_plan.hdr |
447 |
+ |
$(RDU_PFILT) patterns_plan.hdr | $(IMG_CMP) ref/patterns_plan.hdr - |
448 |
+ |
|
449 |
+ |
ref/patterns_plan.hdr: |
450 |
+ |
make patterns_plan.hdr |
451 |
+ |
$(RDU_PFILT) patterns_plan.hdr > ref/patterns_plan.hdr |
452 |
+ |
|
453 |
+ |
patterns_plan.hdr: patterns.oct |
454 |
+ |
rad -v plan patterns.rif |
455 |
+ |
|
456 |
+ |
### End patterns-plan tests |
457 |
+ |
|
458 |
+ |
### Octree for mixtex ### |
459 |
+ |
|
460 |
+ |
mixtex.oct: mixtex.rif |
461 |
+ |
rad -v 0 -N $(NPROC) mixtex.rif |
462 |
+ |
|
463 |
+ |
### Reference and test for mixtex view def ### |
464 |
+ |
|
465 |
+ |
test-mixtex-def: ref/mixtex_def.hdr mixtex_def.hdr |
466 |
+ |
$(RDU_PFILT) mixtex_def.hdr | $(IMG_CMP) ref/mixtex_def.hdr - |
467 |
+ |
|
468 |
+ |
ref/mixtex_def.hdr: |
469 |
+ |
make mixtex_def.hdr |
470 |
+ |
$(RDU_PFILT) mixtex_def.hdr > ref/mixtex_def.hdr |
471 |
+ |
|
472 |
+ |
mixtex_def.hdr: mixtex.oct |
473 |
+ |
rad -v def -N $(NPROC) mixtex.rif |
474 |
+ |
|
475 |
+ |
### End mixtex-def tests |
476 |
+ |
|
477 |
+ |
### Reference and test for mixtex view fish ### |
478 |
+ |
|
479 |
+ |
test-mixtex-fish: ref/mixtex_fish.hdr mixtex_fish.hdr |
480 |
+ |
$(RDU_PFILT) mixtex_fish.hdr | $(IMG_CMP) ref/mixtex_fish.hdr - |
481 |
+ |
|
482 |
+ |
ref/mixtex_fish.hdr: |
483 |
+ |
make mixtex_fish.hdr |
484 |
+ |
$(RDU_PFILT) mixtex_fish.hdr > ref/mixtex_fish.hdr |
485 |
+ |
|
486 |
+ |
mixtex_fish.hdr: mixtex.oct |
487 |
+ |
rad -v fish mixtex.rif |
488 |
+ |
|
489 |
+ |
### End mixtex-fish tests |
490 |
+ |
|
491 |
+ |
### Reference and test for mixtex view plan ### |
492 |
+ |
|
493 |
+ |
test-mixtex-plan: ref/mixtex_plan.hdr mixtex_plan.hdr |
494 |
+ |
$(RDU_PFILT) mixtex_plan.hdr | $(IMG_CMP) ref/mixtex_plan.hdr - |
495 |
+ |
|
496 |
+ |
ref/mixtex_plan.hdr: |
497 |
+ |
make mixtex_plan.hdr |
498 |
+ |
$(RDU_PFILT) mixtex_plan.hdr > ref/mixtex_plan.hdr |
499 |
+ |
|
500 |
+ |
mixtex_plan.hdr: mixtex.oct |
501 |
+ |
rad -v plan mixtex.rif |
502 |
+ |
|
503 |
+ |
### End mixtex-plan tests |
504 |
+ |
|
505 |
+ |
### Reference and test for mixtex view rplan ### |
506 |
+ |
|
507 |
+ |
test-mixtex-rplan: ref/mixtex_rplan.hdr mixtex_rplan.hdr |
508 |
+ |
$(RDU_PFILT) mixtex_rplan.hdr | $(IMG_CMP) ref/mixtex_rplan.hdr - |
509 |
+ |
|
510 |
+ |
ref/mixtex_rplan.hdr: |
511 |
+ |
make mixtex_rplan.hdr |
512 |
+ |
$(RDU_PFILT) mixtex_rplan.hdr > ref/mixtex_rplan.hdr |
513 |
+ |
|
514 |
+ |
mixtex_rplan.hdr: mixtex.oct |
515 |
+ |
rad -v rplan mixtex.rif |
516 |
+ |
|
517 |
+ |
### End mixtex-rplan tests |