| 4 |
|
# |
| 5 |
|
|
| 6 |
|
# Number of processes to use on tests that run multi-core |
| 7 |
< |
NPROC = 2 |
| 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 -rms 0.08 -max 1.5 |
| 18 |
|
|
| 19 |
|
# Default target is to test everything |
| 20 |
|
all: test-xform test-oconv test-rad test-rfluxmtx test-rpiece \ |
| 25 |
|
test-tfunc-def test-tfunc-fish test-inst-def test-inst-fish \ |
| 26 |
|
test-mesh-def test-mesh-cyl test-mirror-fish test-mist-def \ |
| 27 |
|
test-trans-def test-trans-fish test-patterns-def test-patterns-plan \ |
| 28 |
< |
test-rtrace |
| 28 |
> |
test-rtrace test-obj2mesh |
| 29 |
|
|
| 30 |
|
clean: |
| 31 |
|
rm -f *.oct *.amb *_ill.dat blinds_ill?.dat *_*.hdr *.unf \ |
| 39 |
|
|
| 40 |
|
### Special test of xform ### |
| 41 |
|
|
| 42 |
< |
test-xform: combined_scene.rad |
| 43 |
< |
xform -f combined_scene.rad | grep -v '^[ ]*#' > combined.rad |
| 40 |
< |
radcompare -max 0.04 ref/combined.rad combined.rad |
| 42 |
> |
test-xform: combined.rad |
| 43 |
> |
radcompare "-c#" -max 0.04 ref/combined.rad combined.rad |
| 44 |
|
|
| 45 |
+ |
combined.rad: combined_scene.rad |
| 46 |
+ |
xform -f combined_scene.rad > combined.rad |
| 47 |
+ |
|
| 48 |
|
### Special test of rad ### |
| 49 |
|
|
| 50 |
< |
test-rad: inst.rif |
| 50 |
> |
test-rad: inst.oct |
| 51 |
|
rad -n -s -e inst.rif > inst_rad.txt |
| 52 |
|
radcompare ref/inst_rad.txt inst_rad.txt |
| 53 |
|
|
| 54 |
< |
### Special test of oconv ### |
| 54 |
> |
### Special tests of oconv and obj2mesh ### |
| 55 |
|
|
| 56 |
|
test-oconv: inst.oct |
| 57 |
|
radcompare ref/inst.oct inst.oct |
| 58 |
|
|
| 59 |
+ |
test-obj2mesh: cab.obj |
| 60 |
+ |
obj2mesh -w cab.obj | radcompare ref/cab.rtm - |
| 61 |
+ |
|
| 62 |
|
### Special test of rtrace ### |
| 63 |
|
|
| 64 |
|
test-rtrace: ref/mirror_fish.hdr rtmirror_fish.hdr |
| 74 |
|
### Special test for rfluxmtx (and rcontrib) ### |
| 75 |
|
|
| 76 |
|
test-rfluxmtx: ref/rfmirror.mtx rfmirror.mtx |
| 77 |
< |
radcompare -max .4 -rms .05 ref/rfmirror.mtx rfmirror.mtx |
| 77 |
> |
radcompare -max .4 -rms .05 -rel 1e-4 ref/rfmirror.mtx rfmirror.mtx |
| 78 |
|
|
| 79 |
|
rfmirror.mtx: mirror.rad dummysky.rad basic.mat diorama_walls.rad \ |
| 80 |
|
closed_end.rad front_cap.rad glass_pane.rad antimatter_portal.rad |
| 315 |
|
|
| 316 |
|
### Octree for tfunc ### |
| 317 |
|
|
| 318 |
< |
tfunc.oct: tfunc.rif |
| 318 |
> |
tfunc1.oct: tfunc.rif |
| 319 |
|
rad -v 0 tfunc.rif |
| 320 |
|
|
| 321 |
|
### Reference and test for tfunc view def ### |
| 327 |
|
make tfunc_def.hdr |
| 328 |
|
$(RDU_PFILT) tfunc_def.hdr > ref/tfunc_def.hdr |
| 329 |
|
|
| 330 |
< |
tfunc_def.hdr: tfunc.oct |
| 330 |
> |
tfunc_def.hdr: tfunc1.oct |
| 331 |
|
rad -v def tfunc.rif |
| 332 |
|
|
| 333 |
|
### End tfunc-def tests |
| 341 |
|
make tfunc_fish.hdr |
| 342 |
|
$(RDU_PFILT) tfunc_fish.hdr > ref/tfunc_fish.hdr |
| 343 |
|
|
| 344 |
< |
tfunc_fish.hdr: tfunc.oct |
| 344 |
> |
tfunc_fish.hdr: tfunc1.oct |
| 345 |
|
rad -v fish tfunc.rif |
| 346 |
|
|
| 347 |
|
### End tfunc-fish tests |
| 381 |
|
|
| 382 |
|
### Octree for trans2 ### |
| 383 |
|
|
| 384 |
< |
trans2.oct: trans2.rif |
| 384 |
> |
trans21.oct: trans2.rif |
| 385 |
|
rad -v 0 trans2.rif |
| 386 |
|
|
| 387 |
|
### Reference and test for trans2 view def ### |
| 393 |
|
make trans2_def.hdr |
| 394 |
|
$(RDU_PFILT) trans2_def.hdr > ref/trans2_def.hdr |
| 395 |
|
|
| 396 |
< |
trans2_def.hdr: trans2.oct |
| 396 |
> |
trans2_def.hdr: trans21.oct |
| 397 |
|
rad -v def trans2.rif |
| 398 |
|
|
| 399 |
|
### End trans2-def tests |
| 407 |
|
make trans2_fish.hdr |
| 408 |
|
$(RDU_PFILT) trans2_fish.hdr > ref/trans2_fish.hdr |
| 409 |
|
|
| 410 |
< |
trans2_fish.hdr: trans2.oct |
| 410 |
> |
trans2_fish.hdr: trans21.oct |
| 411 |
|
rad -v fish trans2.rif |
| 412 |
|
|
| 413 |
|
### End trans2-fish tests |
| 421 |
|
make trans2_win.hdr |
| 422 |
|
$(RDU_PFILT) trans2_win.hdr > ref/trans2_win.hdr |
| 423 |
|
|
| 424 |
< |
trans2_win.hdr: trans2.oct |
| 424 |
> |
trans2_win.hdr: trans21.oct |
| 425 |
|
rad -v win trans2.rif |
| 426 |
|
|
| 427 |
|
### End trans2-win tests |