--- ray/test/renders/Makefile 2018/11/21 22:59:04 1.8 +++ ray/test/renders/Makefile 2019/02/13 17:24:06 1.20 @@ -1,30 +1,80 @@ -# RCSid $Id: Makefile,v 1.8 2018/11/21 22:59:04 greg Exp $ +# RCSid $Id: Makefile,v 1.20 2019/02/13 17:24:06 greg Exp $ # # Render and primitive type testing # +# Number of processes to use on tests that run multi-core +NPROC = 2 + # Image reduction for comparisons RDU_PFILT = pfilt -1 -r 1 -x 128 -y 128 -pa 1 # Image comparison command -IMG_CMP = radcompare -rms 0.08 -max 1.5 +IMG_CMP = radcompare -rms 0.07 -max 1.5 # Default target is to test everything -all: test-xform test-trans2-def test-trans2-fish test-dielectric-def \ +all: test-xform test-oconv test-rad test-rfluxmtx test-rpiece \ +test-rpict test-mkpmap \ +test-mixtex-def test-mixtex-fish test-mixtex-plan test-mixtex-rplan \ +test-trans2-def test-trans2-fish test-dielectric-def \ test-dielectric-fish test-glass-def test-glass-fish test-glass-up \ test-tfunc-def test-tfunc-fish test-inst-def test-inst-fish \ test-mesh-def test-mesh-cyl test-mirror-fish test-mist-def \ -test-trans-def test-trans-fish test-patterns-def test-mixtex-def +test-trans-def test-trans-fish test-patterns-def test-patterns-plan \ +test-rtrace clean: - rm -f *.oct *.amb *_ill.dat *_*.hdr *.unf combined.rad + rm -f *.oct *.amb *_ill.dat blinds_ill?.dat *_*.hdr *.unf \ +*.[cg]pm{,.leaf} inst_rad.txt combined.rad rfmirror.mtx -# Special test of xform +### Test Aliases ### -test-xform: combined_scene.rad +test-rpict: test-mirror-fish + +test-rpiece test-mkpmap: test-mixtex-def + +### Special test of xform ### + +test-xform: combined.rad + radcompare -max 0.04 ref/combined.rad combined.rad + +combined.rad: combined_scene.rad xform -f combined_scene.rad | grep -v '^[ ]*#' > combined.rad - radcompare ref/combined.rad combined.rad +### Special test of rad ### + +test-rad: inst.rif + rad -n -s -e inst.rif > inst_rad.txt + radcompare ref/inst_rad.txt inst_rad.txt + +### Special test of oconv ### + +test-oconv: inst.oct + radcompare ref/inst.oct inst.oct + +### Special test of rtrace ### + +test-rtrace: ref/mirror_fish.hdr rtmirror_fish.hdr + $(RDU_PFILT) rtmirror_fish.hdr | $(IMG_CMP) -h ref/mirror_fish.hdr - + +rtmirror_fish.hdr: mirror.oct + rad -v 0 mirror.rif OPT=mirror.opt + vwrays -ff -vf fish.vf -x 2048 -y 2048 | rtrace -n $(NPROC) @mirror.opt \ +-ffc -x 2048 -y 2048 mirror.oct | pfilt -1 -e +3 -r .6 -x /2 -y /2 \ +> rtmirror_fish.hdr + rm -f mirror.opt + +### Special test for rfluxmtx (and rcontrib) ### + +test-rfluxmtx: ref/rfmirror.mtx rfmirror.mtx + radcompare -max .4 -rms .05 ref/rfmirror.mtx rfmirror.mtx + +rfmirror.mtx: mirror.rad dummysky.rad basic.mat diorama_walls.rad \ +closed_end.rad front_cap.rad glass_pane.rad antimatter_portal.rad + rfluxmtx -n $(NPROC) -ab 2 -lw 1e-4 mirror.rad dummysky.rad \ +basic.mat diorama_walls.rad closed_end.rad front_cap.rad \ +glass_pane.rad antimatter_portal.rad > rfmirror.mtx + ### Octree for dielectric ### dielectric.oct: dielectric.rif @@ -204,11 +254,6 @@ mirror_fish.hdr: mirror.oct ### End mirror-fish tests -### Octree for mist ### - -mist.oct: mist.rif - rad -v 0 mist.rif - ### Reference and test for mist view def ### test-mist-def: ref/mist_def.hdr mist_def.hdr @@ -218,8 +263,8 @@ ref/mist_def.hdr: make mist_def.hdr $(RDU_PFILT) mist_def.hdr > ref/mist_def.hdr -mist_def.hdr: mist.oct - rad -v def mist.rif +mist_def.hdr: mist.rif + rad -N $(NPROC) mist.rif ### End mist-def tests @@ -393,10 +438,24 @@ patterns_def.hdr: patterns.oct ### End patterns-def tests +### Reference and test for patterns view plan ### + +test-patterns-plan: ref/patterns_plan.hdr patterns_plan.hdr + $(RDU_PFILT) patterns_plan.hdr | $(IMG_CMP) ref/patterns_plan.hdr - + +ref/patterns_plan.hdr: + make patterns_plan.hdr + $(RDU_PFILT) patterns_plan.hdr > ref/patterns_plan.hdr + +patterns_plan.hdr: patterns.oct + rad -v plan patterns.rif + +### End patterns-plan tests + ### Octree for mixtex ### mixtex.oct: mixtex.rif - rad -v 0 mixtex.rif + rad -v 0 -N $(NPROC) mixtex.rif ### Reference and test for mixtex view def ### @@ -408,6 +467,48 @@ ref/mixtex_def.hdr: $(RDU_PFILT) mixtex_def.hdr > ref/mixtex_def.hdr mixtex_def.hdr: mixtex.oct - rad -v def mixtex.rif + rad -v def -N $(NPROC) mixtex.rif ### End mixtex-def tests + +### Reference and test for mixtex view fish ### + +test-mixtex-fish: ref/mixtex_fish.hdr mixtex_fish.hdr + $(RDU_PFILT) mixtex_fish.hdr | $(IMG_CMP) ref/mixtex_fish.hdr - + +ref/mixtex_fish.hdr: + make mixtex_fish.hdr + $(RDU_PFILT) mixtex_fish.hdr > ref/mixtex_fish.hdr + +mixtex_fish.hdr: mixtex.oct + rad -v fish mixtex.rif + +### End mixtex-fish tests + +### Reference and test for mixtex view plan ### + +test-mixtex-plan: ref/mixtex_plan.hdr mixtex_plan.hdr + $(RDU_PFILT) mixtex_plan.hdr | $(IMG_CMP) ref/mixtex_plan.hdr - + +ref/mixtex_plan.hdr: + make mixtex_plan.hdr + $(RDU_PFILT) mixtex_plan.hdr > ref/mixtex_plan.hdr + +mixtex_plan.hdr: mixtex.oct + rad -v plan mixtex.rif + +### End mixtex-plan tests + +### Reference and test for mixtex view rplan ### + +test-mixtex-rplan: ref/mixtex_rplan.hdr mixtex_rplan.hdr + $(RDU_PFILT) mixtex_rplan.hdr | $(IMG_CMP) ref/mixtex_rplan.hdr - + +ref/mixtex_rplan.hdr: + make mixtex_rplan.hdr + $(RDU_PFILT) mixtex_rplan.hdr > ref/mixtex_rplan.hdr + +mixtex_rplan.hdr: mixtex.oct + rad -v rplan mixtex.rif + +### End mixtex-rplan tests