1 |
greg |
1.2 |
# RCSid $Id: Makefile,v 1.1 2020/06/30 23:52:50 greg Exp $ |
2 |
greg |
1.1 |
# |
3 |
|
|
# Unit tests for tools built in src/px |
4 |
|
|
# |
5 |
|
|
|
6 |
|
|
HDR_CMP = radcompare -rms 0.07 -rel 1e-6 -max 0.2 |
7 |
|
|
|
8 |
greg |
1.2 |
IMG_CMP = radcompare -h -rms 0.03 -rel 0.007 -max 0.2 |
9 |
greg |
1.1 |
|
10 |
|
|
all: test-pfilt test-pvalue test-ra_tiff test-normtiff test-pcompos \ |
11 |
greg |
1.2 |
test-protate test-pflip test-ra_bmp test-ra_xyze test-pcond test-ra_t16 \ |
12 |
|
|
test-ra_rgbe test-ra_ppm test-pextrem test-pcomb |
13 |
greg |
1.1 |
|
14 |
|
|
clean: |
15 |
greg |
1.2 |
rm -f test.hdr test24.hdr test24.tif test32L.tif pcomb.hdr \ |
16 |
|
|
norm24.tif norm8.tif pcompos.hdr pcondh.hdr test_extrema.txt |
17 |
|
|
|
18 |
|
|
test-pcond: test.hdr |
19 |
|
|
pcond -h test.hdr pcondh.hdr |
20 |
|
|
$(IMG_CMP) ref/pcondh.hdr pcondh.hdr |
21 |
|
|
rm -f pcondh.hdr |
22 |
|
|
|
23 |
|
|
test-pcomb: test.hdr |
24 |
|
|
pcomb -e 'm=1/(gi(1)+.1);ro=gi(1)*m;go=bi(1)*m;bo=ri(1)*m' \ |
25 |
|
|
test.hdr > pcomb.hdr |
26 |
|
|
$(HDR_CMP) ref/pcomb.hdr pcomb.hdr |
27 |
|
|
rm -f pcomb.hdr |
28 |
|
|
|
29 |
|
|
test-ra_xyze: test-pfilt |
30 |
greg |
1.1 |
|
31 |
|
|
test-pfilt: test.hdr |
32 |
|
|
$(HDR_CMP) ref/test.hdr test.hdr |
33 |
|
|
|
34 |
|
|
test-pvalue: test24.hdr |
35 |
|
|
$(IMG_CMP) ref/test24.hdr test24.hdr |
36 |
|
|
|
37 |
greg |
1.2 |
test-pextrem: test.hdr |
38 |
|
|
pextrem -o test.hdr > test_extrema.txt |
39 |
|
|
radcompare ref/test_extrema.txt test_extrema.txt |
40 |
|
|
rm -f test_extrema.txt |
41 |
|
|
|
42 |
|
|
test-protate test-pflip: test-pcompos |
43 |
|
|
|
44 |
|
|
test-pcompos: test.hdr test24.hdr |
45 |
greg |
1.1 |
protate -r test.hdr | pcompos -a 2 -s 10 -b 1 1 1 \ |
46 |
|
|
'!pflip -h test24.hdr' - \ |
47 |
|
|
'!pflip -v test24.hdr' '!protate test.hdr' > pcompos.hdr |
48 |
|
|
$(HDR_CMP) ref/pcompos.hdr pcompos.hdr |
49 |
|
|
rm -f pcompos.hdr |
50 |
|
|
|
51 |
greg |
1.2 |
test-ra_rgbe: test.hdr |
52 |
|
|
ra_rgbe -e -5 test.hdr | ra_rgbe -r -e +5 | $(HDR_CMP) -w test.hdr - |
53 |
|
|
|
54 |
greg |
1.1 |
test-ra_tiff: test.hdr test24.hdr |
55 |
|
|
ra_tiff test24.hdr test24.tif |
56 |
|
|
ra_tiff -r test24.tif | $(IMG_CMP) test24.hdr - |
57 |
|
|
ra_tiff -L test.hdr test32L.tif |
58 |
|
|
ra_tiff -r test32L.tif | $(HDR_CMP) -h test.hdr - |
59 |
|
|
rm -f test24.tif test32L.tif |
60 |
|
|
|
61 |
|
|
test-normtiff: test.hdr |
62 |
|
|
normtiff -z test.hdr norm24.tif |
63 |
|
|
radcompare ref/norm24.tif norm24.tif |
64 |
|
|
normtiff -z -b test.hdr norm8.tif |
65 |
|
|
radcompare ref/norm8.tif norm8.tif |
66 |
|
|
rm -f norm24.tif norm8.tif |
67 |
|
|
|
68 |
greg |
1.2 |
test-ra_bmp: test24.hdr |
69 |
|
|
ra_bmp test24.hdr | ra_bmp -r | $(IMG_CMP) test24.hdr - |
70 |
|
|
|
71 |
|
|
test-ra_t16: test24.hdr |
72 |
|
|
ra_t16 -3 test24.hdr | ra_t16 -r | $(IMG_CMP) test24.hdr - |
73 |
|
|
|
74 |
|
|
test-ra_ppm: test24.hdr |
75 |
|
|
ra_ppm test24.hdr | ra_ppm -r | $(IMG_CMP) test24.hdr - |
76 |
|
|
|
77 |
greg |
1.1 |
test24.hdr: test.hdr |
78 |
greg |
1.2 |
pvalue -g 2.2 -db test.hdr | pvalue -r -g 2.2 -db > test24.hdr |
79 |
greg |
1.1 |
|
80 |
|
|
test.hdr: ../renders/sunset.hdr |
81 |
greg |
1.2 |
pfilt -x /2.5 -y /2.5 -r .6 ../renders/sunset.hdr \ |
82 |
|
|
| ra_xyze -r > test.hdr |