ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/test/px/Makefile
Revision: 1.4
Committed: Wed Jul 1 18:18:03 2020 UTC (4 years, 10 months ago) by greg
Branch: MAIN
Changes since 1.3: +8 -3 lines
Log Message:
test(ra_ps): added missing unit test

File Contents

# User Rev Content
1 greg 1.4 # RCSid $Id: Makefile,v 1.3 2020/07/01 18:04:19 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 greg 1.3 test-ra_rgbe test-ra_ppm test-pextrem test-pcomb test-pinterp test-psign \
13 greg 1.4 test-falsecolor test-ra_ps
14 greg 1.1
15     clean:
16 greg 1.2 rm -f test.hdr test24.hdr test24.tif test32L.tif pcomb.hdr \
17 greg 1.3 norm24.tif norm8.tif pcompos.hdr pcondh.hdr test_extrema.txt psign.hdr \
18 greg 1.4 pinterp.hdr false.hdr ra_psC.ps
19 greg 1.2
20     test-pcond: test.hdr
21     pcond -h test.hdr pcondh.hdr
22     $(IMG_CMP) ref/pcondh.hdr pcondh.hdr
23     rm -f pcondh.hdr
24    
25     test-pcomb: test.hdr
26     pcomb -e 'm=1/(gi(1)+.1);ro=gi(1)*m;go=bi(1)*m;bo=ri(1)*m' \
27     test.hdr > pcomb.hdr
28     $(HDR_CMP) ref/pcomb.hdr pcomb.hdr
29     rm -f pcomb.hdr
30    
31     test-ra_xyze: test-pfilt
32 greg 1.1
33     test-pfilt: test.hdr
34     $(HDR_CMP) ref/test.hdr test.hdr
35    
36     test-pvalue: test24.hdr
37     $(IMG_CMP) ref/test24.hdr test24.hdr
38    
39 greg 1.2 test-pextrem: test.hdr
40     pextrem -o test.hdr > test_extrema.txt
41     radcompare ref/test_extrema.txt test_extrema.txt
42     rm -f test_extrema.txt
43    
44     test-protate test-pflip: test-pcompos
45    
46     test-pcompos: test.hdr test24.hdr
47 greg 1.1 protate -r test.hdr | pcompos -a 2 -s 10 -b 1 1 1 \
48     '!pflip -h test24.hdr' - \
49     '!pflip -v test24.hdr' '!protate test.hdr' > pcompos.hdr
50     $(HDR_CMP) ref/pcompos.hdr pcompos.hdr
51     rm -f pcompos.hdr
52    
53 greg 1.3 test-pinterp: test.hdr
54     pinterp -vtv -vh 60 -vv 40 -x 200 -y 200 test.hdr 1.0 > pinterp.hdr
55     $(HDR_CMP) ref/pinterp.hdr pinterp.hdr
56     rm -f pinterp.hdr
57    
58     test-psign:
59     psign -cb .9 .4 .01 -cf .1 .2 1 -dd -h 200 -a 1.5 -s -.1 Testing > psign.hdr
60     $(HDR_CMP) ref/psign.hdr psign.hdr
61     rm -f psign.hdr
62    
63     test-falsecolor:
64     falsecolor -s 2e5 -log 5 -i test.hdr > false.hdr
65     $(HDR_CMP) ref/false.hdr false.hdr
66     rm -f false.hdr
67    
68 greg 1.2 test-ra_rgbe: test.hdr
69     ra_rgbe -e -5 test.hdr | ra_rgbe -r -e +5 | $(HDR_CMP) -w test.hdr -
70    
71 greg 1.1 test-ra_tiff: test.hdr test24.hdr
72     ra_tiff test24.hdr test24.tif
73     ra_tiff -r test24.tif | $(IMG_CMP) test24.hdr -
74     ra_tiff -L test.hdr test32L.tif
75     ra_tiff -r test32L.tif | $(HDR_CMP) -h test.hdr -
76     rm -f test24.tif test32L.tif
77    
78     test-normtiff: test.hdr
79     normtiff -z test.hdr norm24.tif
80     radcompare ref/norm24.tif norm24.tif
81     normtiff -z -b test.hdr norm8.tif
82     radcompare ref/norm8.tif norm8.tif
83     rm -f norm24.tif norm8.tif
84    
85 greg 1.2 test-ra_bmp: test24.hdr
86     ra_bmp test24.hdr | ra_bmp -r | $(IMG_CMP) test24.hdr -
87    
88     test-ra_t16: test24.hdr
89     ra_t16 -3 test24.hdr | ra_t16 -r | $(IMG_CMP) test24.hdr -
90    
91     test-ra_ppm: test24.hdr
92     ra_ppm test24.hdr | ra_ppm -r | $(IMG_CMP) test24.hdr -
93    
94 greg 1.4 test-ra_ps: test.hdr
95     ra_ps -b -C test.hdr > ra_psC.ps
96     radcompare ref/ra_psC.ps ra_psC.ps
97     rm -f ra_psC.ps
98    
99 greg 1.1 test24.hdr: test.hdr
100 greg 1.2 pvalue -g 2.2 -db test.hdr | pvalue -r -g 2.2 -db > test24.hdr
101 greg 1.1
102     test.hdr: ../renders/sunset.hdr
103 greg 1.2 pfilt -x /2.5 -y /2.5 -r .6 ../renders/sunset.hdr \
104     | ra_xyze -r > test.hdr