]>
Commit | Line | Data |
---|---|---|
b32e6256 | 1 | @echo off |
193013f9 MS |
2 | :: |
3 | :: "$Id$" | |
4 | :: | |
5 | :: IPP Everywhere Printer Self-Certification Manual 1.0: Section 5: Bonjour Tests. | |
6 | :: | |
7 | :: Copyright 2014 by The Printer Working Group. | |
8 | :: | |
9 | :: This program may be copied and furnished to others, and derivative works | |
10 | :: that comment on, or otherwise explain it or assist in its implementation may | |
11 | :: be prepared, copied, published and distributed, in whole or in part, without | |
12 | :: restriction of any kind, provided that the above copyright notice and this | |
13 | :: paragraph are included on all such copies and derivative works. | |
14 | :: | |
15 | :: The IEEE-ISTO and the Printer Working Group DISCLAIM ANY AND ALL WARRANTIES, | |
16 | :: WHETHER EXPRESS OR IMPLIED INCLUDING (WITHOUT LIMITATION) ANY IMPLIED | |
17 | :: WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. | |
18 | :: | |
19 | :: Usage: | |
20 | :: | |
21 | :: bonjour-tests.bat 'Printer Name' | |
22 | :: | |
23 | ||
b32e6256 MS |
24 | set PLIST=%1 Bonjour Results.plist |
25 | echo Sending output to "%PLIST%"... | |
193013f9 MS |
26 | |
27 | :: Write the standard XML plist header... | |
b32e6256 MS |
28 | echo ^<?xml version=^"1.0^" encoding=^"UTF-8^"?^> >"%PLIST%" |
29 | echo ^<!DOCTYPE plist PUBLIC ^"-//Apple Computer//DTD PLIST 1.0//EN^" ^"http://www.apple.com/DTDs/PropertyList-1.0.dtd^"^> >>"%PLIST%" | |
30 | echo ^<plist version=^"1.0^"^> >>"%PLIST%" | |
31 | echo ^<dict^> >>"%PLIST%" | |
32 | echo ^<key^>Tests^</key^>^<array^> >>"%PLIST%" | |
193013f9 MS |
33 | |
34 | set total=0 | |
35 | set pass=0 | |
36 | set fail=0 | |
37 | set skip=0 | |
38 | ||
39 | :: B-1. IPP Browse test: Printers appear in a search for "_ipp._tcp,_print" services? | |
b32e6256 MS |
40 | set /a total+=1 |
41 | set <NUL /p="B-1. IPP Browse test: " | |
42 | echo ^<dict^>^<key^>Name^</key^>^<string^>B-1. IPP Browse test^</string^> >>"%PLIST%" | |
43 | echo ^<key^>FileId^</key^>^<string^>org.pwg.ipp-everywhere.20140826.bonjour^</string^> >>"%PLIST%" | |
44 | ||
3c08d652 MS |
45 | set result=FAIL |
46 | ippfind _ipp._tcp,_print.local. --name "%1" --quiet && set result=PASS | |
1b6d468c MS |
47 | if "%result%" == "PASS" ( |
48 | set /a pass+=1 | |
1b6d468c MS |
49 | ) else ( |
50 | set /a fail+=1 | |
1b6d468c | 51 | ) |
193013f9 | 52 | |
b32e6256 MS |
53 | echo %result% |
54 | if "%result%" == "FAIL" ( | |
55 | echo ^<key^>Successful^</key^>^<false /^> >>"%PLIST%" | |
56 | ) else ( | |
57 | echo ^<key^>Successful^</key^>^<true /^> >>"%PLIST%" | |
58 | ) | |
59 | echo ^</dict^> >>"%PLIST%" | |
60 | ||
193013f9 | 61 | :: B-2. IPP TXT keys test: The IPP TXT record contains all required keys. |
b32e6256 MS |
62 | set /a total+=1 |
63 | set <NUL /p="B-2. IPP TXT keys test: " | |
64 | echo ^<dict^>^<key^>Name^</key^>^<string^>B-2. IPP TXT keys test^</string^> >>"%PLIST%" | |
65 | echo ^<key^>FileId^</key^>^<string^>org.pwg.ipp-everywhere.20140826.bonjour^</string^> >>"%PLIST%" | |
66 | ||
3c08d652 MS |
67 | set result=FAIL |
68 | ippfind "%1._ipp._tcp.local." --txt adminurl --txt pdl --txt rp --txt UUID --quiet && set result=PASS | |
1b6d468c MS |
69 | if "%result%" == "PASS" ( |
70 | set /a pass+=1 | |
1b6d468c MS |
71 | ) else ( |
72 | set /a fail+=1 | |
b32e6256 MS |
73 | echo ^<key^>Errors^</key^>^<array^>^<string^> >>"%PLIST%" |
74 | ippfind "%1._ipp._tcp.local." -x echo adminurl="{txt_adminurl}" ";" >>"%PLIST%" | |
75 | ippfind "%1._ipp._tcp.local." -x echo pdl="{txt_pdl}" ";" >>"%PLIST%" | |
76 | ippfind "%1._ipp._tcp.local." -x echo rp="{txt_rp}" ";" >>"%PLIST%" | |
77 | ippfind "%1._ipp._tcp.local." -x echo UUID="{txt_uuid}" ";" >>"%PLIST%" | |
78 | echo ^</string^>^</array^> >>"%PLIST%" | |
79 | ) | |
80 | ||
81 | echo %result% | |
82 | if "%result%" == "FAIL" ( | |
83 | echo ^<key^>Successful^</key^>^<false /^> >>"%PLIST%" | |
84 | ||
85 | ippfind "%1._ipp._tcp.local." -x echo adminurl="{txt_adminurl}" ";" | |
86 | ippfind "%1._ipp._tcp.local." -x echo pdl="{txt_pdl}" ";" | |
87 | ippfind "%1._ipp._tcp.local." -x echo rp="{txt_rp}" ";" | |
88 | ippfind "%1._ipp._tcp.local." -x echo UUID="{txt_uuid}" ";" | |
89 | ) else ( | |
90 | echo ^<key^>Successful^</key^>^<true /^> >>"%PLIST%" | |
1b6d468c | 91 | ) |
b32e6256 | 92 | echo ^</dict^> >>"%PLIST%" |
193013f9 MS |
93 | |
94 | :: B-3. IPP Resolve test: Printer responds to an IPP Get-Printer-Attributes request using the resolved hostname, port, and resource path. | |
b32e6256 MS |
95 | set /a total+=1 |
96 | set <NUL /p="B-3. IPP Resolve test: " | |
97 | echo ^<dict^>^<key^>Name^</key^>^<string^>B-3. IPP Resolve test^</string^> >>"%PLIST%" | |
98 | echo ^<key^>FileId^</key^>^<string^>org.pwg.ipp-everywhere.20140826.bonjour^</string^> >>"%PLIST%" | |
99 | ||
3c08d652 | 100 | set result=FAIL |
1b6d468c MS |
101 | (ippfind "%1._ipp._tcp.local." --ls && set result=PASS) >nul: |
102 | if "%result%" == "PASS" ( | |
103 | set /a pass+=1 | |
1b6d468c MS |
104 | ) else ( |
105 | set /a fail+=1 | |
b32e6256 | 106 | echo ^<key^>Errors^</key^>^<array^>^<string^> >>"%PLIST%" |
1b6d468c | 107 | ippfind "%1._ipp._tcp.local." --ls >>"%PLIST%" |
b32e6256 | 108 | echo ^</string^>^</array^> >>"%PLIST%" |
1b6d468c | 109 | ) |
193013f9 | 110 | |
b32e6256 MS |
111 | echo %result% |
112 | if "%result%" == "FAIL" ( | |
113 | echo ^<key^>Successful^</key^>^<false /^> >>"%PLIST%" | |
114 | ) else ( | |
115 | echo ^<key^>Successful^</key^>^<true /^> >>"%PLIST%" | |
116 | ) | |
117 | echo ^</dict^> >>"%PLIST%" | |
118 | ||
193013f9 | 119 | :: B-4. IPP TXT values test: The IPP TXT record values match the reported IPP attribute values. |
b32e6256 MS |
120 | set /a total+=1 |
121 | set <NUL /p="B-4. IPP TXT values test: " | |
122 | echo ^<dict^>^<key^>Name^</key^>^<string^>B-4. IPP TXT values test^</string^> >>"%PLIST%" | |
123 | echo ^<key^>FileId^</key^>^<string^>org.pwg.ipp-everywhere.20140826.bonjour^</string^> >>"%PLIST%" | |
124 | ||
3c08d652 | 125 | set result=FAIL |
b32e6256 | 126 | ippfind "%1._ipp._tcp.local." --txt-adminurl ^^^(http:^|https:^)// --txt-pdl image/pwg-raster --txt-pdl image/jpeg --txt-rp ^^ipp/^(print^|print/[^^/]+^)$ --txt-UUID ^^[0-9a-fA-F]{8,8}-[0-9a-fA-F]{4,4}-[0-9a-fA-F]{4,4}-[0-9a-fA-F]{4,4}-[0-9a-fA-F]{12,12}$ -x ipptool -q -d "ADMINURL={txt_adminurl}" -d "UUID={txt_uuid}" "{}" bonjour-value-tests.test ";" && set result=PASS |
1b6d468c MS |
127 | if "%result%" == "PASS" ( |
128 | set /a pass+=1 | |
1b6d468c MS |
129 | ) else ( |
130 | set /a fail+=1 | |
b32e6256 MS |
131 | echo ^<key^>Errors^</key^>^<array^>^<string^> >>"%PLIST%" |
132 | ippfind "%1._ipp._tcp.local." -x echo adminurl="{txt_adminurl}" ";" >>"%PLIST%" | |
133 | ippfind "%1._ipp._tcp.local." -x echo pdl="{txt_pdl}" ";" >>"%PLIST%" | |
134 | ippfind "%1._ipp._tcp.local." -x echo rp="{txt_rp}" ";" >>"%PLIST%" | |
135 | ippfind "%1._ipp._tcp.local." -x echo UUID="{txt_uuid}" ";" >>"%PLIST%" | |
136 | ippfind "%1._ipp._tcp.local." -x ipptool -t "{}" bonjour-value-tests.test ";" | findstr /r [TG][EO][DT]: >>"%PLIST%" | |
137 | echo ^</string^>^</array^> >>"%PLIST%" | |
1b6d468c | 138 | ) |
193013f9 | 139 | |
b32e6256 MS |
140 | echo %result% |
141 | if "%result%" == "FAIL" ( | |
142 | echo ^<key^>Successful^</key^>^<false /^> >>"%PLIST%" | |
143 | ||
144 | ippfind "%1._ipp._tcp.local." -x echo adminurl="{txt_adminurl}" ";" | |
145 | ippfind "%1._ipp._tcp.local." -x echo pdl="{txt_pdl}" ";" | |
146 | ippfind "%1._ipp._tcp.local." -x echo rp="{txt_rp}" ";" | |
147 | ippfind "%1._ipp._tcp.local." -x echo UUID="{txt_uuid}" ";" | |
148 | ippfind "%1._ipp._tcp.local." -x ipptool -t "{}" bonjour-value-tests.test ";" | findstr /r [TG][EO][DT]: | |
149 | ) else ( | |
150 | echo ^<key^>Successful^</key^>^<true /^> >>"%PLIST%" | |
151 | ) | |
152 | echo ^</dict^> >>"%PLIST%" | |
153 | ||
193013f9 | 154 | :: B-5. TLS tests: Performed only if TLS is supported |
b32e6256 MS |
155 | set /a total+=1 |
156 | set <NUL /p="B-5. TLS tests: " | |
157 | echo ^<dict^>^<key^>Name^</key^>^<string^>B-5. TLS tests^</string^> >>"%PLIST%" | |
158 | echo ^<key^>FileId^</key^>^<string^>org.pwg.ipp-everywhere.20140826.bonjour^</string^> >>"%PLIST%" | |
159 | ||
160 | set result=SKIP | |
161 | ippfind "%1._ipp._tcp.local." --txt tls --quiet && set result=PASS | |
1b6d468c MS |
162 | if "%result%" == "PASS" ( |
163 | set /a pass+=1 | |
3c08d652 | 164 | set HAVE_TLS=1 |
1b6d468c MS |
165 | ) else ( |
166 | set /a skip+=1 | |
3c08d652 | 167 | set HAVE_TLS=0 |
1b6d468c | 168 | ) |
193013f9 | 169 | |
b32e6256 MS |
170 | echo %result% |
171 | if "%result%" == "SKIP" ( | |
172 | echo ^<key^>Successful^</key^>^<true /^> >>"%PLIST%" | |
173 | echo ^<key^>Skipped^</key^>^<true /^> >>"%PLIST%" | |
174 | ) else ( | |
175 | echo ^<key^>Successful^</key^>^<true /^> >>"%PLIST%" | |
176 | ) | |
177 | echo ^</dict^> >>"%PLIST%" | |
178 | ||
193013f9 | 179 | :: B-5.1 HTTP Upgrade test: Printer responds to an IPP Get-Printer-Attributes request after doing an HTTP Upgrade to TLS. |
b32e6256 MS |
180 | set /a total+=1 |
181 | set <NUL /p="B-5.1 HTTP Upgrade test: " | |
182 | echo ^<dict^>^<key^>Name^</key^>^<string^>B-5.1 HTTP Upgrade test^</string^> >>"%PLIST%" | |
183 | echo ^<key^>FileId^</key^>^<string^>org.pwg.ipp-everywhere.20140826.bonjour^</string^> >>"%PLIST%" | |
184 | ||
1b6d468c | 185 | if "%HAVE_TLS%" == "1" ( |
3c08d652 | 186 | set result=FAIL |
1b6d468c MS |
187 | ippfind "%1._ipp._tcp.local." -x ipptool -E -q "{}" bonjour-access-tests.test ";" && set result=PASS |
188 | if "%result%" == "PASS" ( | |
189 | set /a pass+=1 | |
1b6d468c MS |
190 | ) else ( |
191 | set /a fail+=1 | |
b32e6256 | 192 | echo ^<key^>Errors^</key^>^<array^>^<string^> >>"%PLIST" |
1b6d468c | 193 | ippfind "%1._ipp._tcp.local." -x ipptool -E -q "{}" bonjour-access-tests.test ";" >>"%PLIST%" |
b32e6256 | 194 | echo ^</string^>^</array^> >>"%PLIST%" |
1b6d468c MS |
195 | ) |
196 | ) else ( | |
197 | set /a skip+=1 | |
b32e6256 MS |
198 | set result=SKIP |
199 | ) | |
200 | ||
201 | echo %result% | |
202 | if "%result%" == "FAIL" ( | |
203 | echo ^<key^>Successful^</key^>^<false /^> >>"%PLIST%" | |
204 | ) else ( | |
205 | if "%result%" == "SKIP" ( | |
206 | echo ^<key^>Successful^</key^>^<true /^> >>"%PLIST%" | |
207 | echo ^<key^>Skipped^</key^>^<true /^> >>"%PLIST%" | |
208 | ) else ( | |
209 | echo ^<key^>Successful^</key^>^<true /^> >>"%PLIST%" | |
210 | ) | |
1b6d468c | 211 | ) |
b32e6256 | 212 | echo ^</dict^> >>"%PLIST%" |
193013f9 MS |
213 | |
214 | :: B-5.2 IPPS Browse test: Printer appears in a search for "_ipps._tcp,_print" services. | |
b32e6256 MS |
215 | set /a total+=1 |
216 | set <NUL /p="B-5.2 IPPS Browse test: " | |
217 | echo ^<dict^>^<key^>Name^</key^>^<string^>B-5.2 IPPS Browse test^</string^> >>"%PLIST%" | |
218 | echo ^<key^>FileId^</key^>^<string^>org.pwg.ipp-everywhere.20140826.bonjour^</string^> >>"%PLIST%" | |
219 | ||
1b6d468c MS |
220 | if "%HAVE_TLS%" == "1" ( |
221 | set result=FAIL | |
222 | ippfind _ipps._tcp,_print.local. --name "%1" --quiet && set result=PASS | |
223 | if "%result%" == "PASS" ( | |
224 | set /a pass+=1 | |
1b6d468c MS |
225 | ) else ( |
226 | set /a fail+=1 | |
1b6d468c MS |
227 | ) |
228 | ) else ( | |
229 | set /a skip+=1 | |
b32e6256 | 230 | set result=SKIP |
1b6d468c | 231 | ) |
193013f9 | 232 | |
b32e6256 MS |
233 | echo %result% |
234 | if "%result%" == "FAIL" ( | |
235 | echo ^<key^>Successful^</key^>^<false /^> >>"%PLIST%" | |
236 | ) else ( | |
237 | if "%result%" == "SKIP" ( | |
238 | echo ^<key^>Successful^</key^>^<true /^> >>"%PLIST%" | |
239 | echo ^<key^>Skipped^</key^>^<true /^> >>"%PLIST%" | |
240 | ) else ( | |
241 | echo ^<key^>Successful^</key^>^<true /^> >>"%PLIST%" | |
242 | ) | |
243 | ) | |
244 | echo ^</dict^> >>"%PLIST%" | |
245 | ||
193013f9 | 246 | :: B-5.3 IPPS TXT keys test: The TXT record for IPPS contains all required keys |
b32e6256 MS |
247 | set /a total+=1 |
248 | set <NUL /p="B-5.3 IPPS TXT keys test: " | |
249 | echo ^<dict^>^<key^>Name^</key^>^<string^>B-5.3 IPPS TXT keys test^</string^> >>"%PLIST%" | |
250 | echo ^<key^>FileId^</key^>^<string^>org.pwg.ipp-everywhere.20140826.bonjour^</string^> >>"%PLIST%" | |
251 | ||
1b6d468c MS |
252 | if "%HAVE_TLS%" == "1" ( |
253 | set result=FAIL | |
254 | ippfind "%1._ipps._tcp.local." --txt adminurl --txt pdl --txt rp --txt TLS --txt UUID --quiet && set result=PASS | |
255 | if "%result%" == "PASS" ( | |
256 | set /a pass+=1 | |
1b6d468c MS |
257 | ) else ( |
258 | set /a fail+=1 | |
b32e6256 MS |
259 | echo ^<key^>Errors^</key^>^<array^>^<string^> >>"%PLIST%" |
260 | ippfind "%1._ipps._tcp.local." -x echo adminurl={txt_adminurl}" ";" >>"%PLIST%" | |
261 | ippfind "%1._ipps._tcp.local." -x echo pdl={txt_pdl}" ";" >>"%PLIST%" | |
262 | ippfind "%1._ipps._tcp.local." -x echo rp={txt_rp}" ";" >>"%PLIST%" | |
263 | ippfind "%1._ipps._tcp.local." -x echo TLS={txt_tls}" ";" >>"%PLIST%" | |
264 | ippfind "%1._ipps._tcp.local." -x echo UUID={txt_uuid}" ";" >>"%PLIST%" | |
265 | echo ^</string^>^</array^> >>"%PLIST%" | |
1b6d468c MS |
266 | ) |
267 | ) else ( | |
268 | set /a skip+=1 | |
b32e6256 | 269 | set result=SKIP |
1b6d468c | 270 | ) |
193013f9 | 271 | |
b32e6256 MS |
272 | echo %result% |
273 | if "%result%" == "FAIL" ( | |
274 | echo ^<key^>Successful^</key^>^<false /^> >>"%PLIST%" | |
275 | ||
276 | ippfind "%1._ipps._tcp.local." -x echo adminurl={txt_adminurl}" ";" | |
277 | ippfind "%1._ipps._tcp.local." -x echo pdl={txt_pdl}" ";" | |
278 | ippfind "%1._ipps._tcp.local." -x echo rp={txt_rp}" ";" | |
279 | ippfind "%1._ipps._tcp.local." -x echo TLS={txt_tls}" ";" | |
280 | ippfind "%1._ipps._tcp.local." -x echo UUID={txt_uuid}" ";" | |
281 | ) else ( | |
282 | if "%result%" == "SKIP" ( | |
283 | echo ^<key^>Successful^</key^>^<true /^> >>"%PLIST%" | |
284 | echo ^<key^>Skipped^</key^>^<true /^> >>"%PLIST%" | |
285 | ) else ( | |
286 | echo ^<key^>Successful^</key^>^<true /^> >>"%PLIST%" | |
287 | ) | |
288 | ) | |
289 | echo ^</dict^> >>"%PLIST%" | |
290 | ||
193013f9 | 291 | :: B-5.4 IPPS Resolve test: Printer responds to an IPPS Get-Printer-Attributes request using the resolved hostname, port, and resource path. |
b32e6256 MS |
292 | set /a total+=1 |
293 | set <NUL /p="B-5.4 IPPS Resolve test: " | |
294 | echo ^<dict^>^<key^>Name^</key^>^<string^>B-5.4 IPPS Resolve test^</string^> >>"%PLIST%" | |
295 | echo ^<key^>FileId^</key^>^<string^>org.pwg.ipp-everywhere.20140826.bonjour^</string^> >>"%PLIST%" | |
296 | ||
1b6d468c MS |
297 | if "%HAVE_TLS%" == "1" ( |
298 | set result=FAIL | |
299 | (ippfind "%1._ipps._tcp.local." --ls && set result=PASS) >nul: | |
300 | if "%result%" == "PASS" ( | |
301 | set /a pass+=1 | |
1b6d468c MS |
302 | ) else ( |
303 | set /a fail+=1 | |
b32e6256 | 304 | echo ^<key^>Errors^</key^>^<array^>^<string^> >>"%PLIST%" |
1b6d468c | 305 | ippfind "%1._ipps._tcp.local." --ls >>"%PLIST%" |
b32e6256 | 306 | echo ^</string^>^</array^> >>"%PLIST%" |
1b6d468c MS |
307 | ) |
308 | ) else ( | |
309 | set /a skip+=1 | |
b32e6256 MS |
310 | set result=SKIP |
311 | ) | |
312 | ||
313 | echo %result% | |
314 | if "%result%" == "FAIL" ( | |
315 | echo ^<key^>Successful^</key^>^<false /^> >>"%PLIST%" | |
316 | ) else ( | |
317 | if "%result%" == "SKIP" ( | |
318 | echo ^<key^>Successful^</key^>^<true /^> >>"%PLIST%" | |
319 | echo ^<key^>Skipped^</key^>^<true /^> >>"%PLIST%" | |
320 | ) else ( | |
321 | echo ^<key^>Successful^</key^>^<true /^> >>"%PLIST%" | |
322 | ) | |
1b6d468c | 323 | ) |
b32e6256 | 324 | echo ^</dict^> >>"%PLIST%" |
193013f9 MS |
325 | |
326 | :: B-5.5 IPPS TXT values test: The TXT record values for IPPS match the reported IPPS attribute values. | |
b32e6256 MS |
327 | set /a total+=1 |
328 | set <NUL /p="B-5.5 IPPS TXT values test: " | |
329 | echo ^<dict^>^<key^>Name^</key^>^<string^>B-5.5 IPPS TXT values test^</string^> >>"%PLIST%" | |
330 | echo ^<key^>FileId^</key^>^<string^>org.pwg.ipp-everywhere.20140826.bonjour^</string^> >>"%PLIST%" | |
331 | ||
1b6d468c MS |
332 | if "%HAVE_TLS%" == "1" ( |
333 | set result=FAIL | |
b32e6256 | 334 | ippfind "%1._ipps._tcp.local." --txt-adminurl ^^^(http:^|https:^)// --txt-pdl image/pwg-raster --txt-pdl image/jpeg --txt-rp ^^ipp/^(print^|print/[^^/]+^)$ --txt-UUID ^^[0-9a-fA-F]{8,8}-[0-9a-fA-F]{4,4}-[0-9a-fA-F]{4,4}-[0-9a-fA-F]{4,4}-[0-9a-fA-F]{12,12}$ -x ipptool -q "{}" bonjour-value-tests.test ";" && set result=PASS |
1b6d468c MS |
335 | if "%result%" == "PASS" ( |
336 | set /a pass+=1 | |
1b6d468c MS |
337 | ) else ( |
338 | set /a fail+=1 | |
b32e6256 MS |
339 | echo ^<key^>Errors^</key^>^<array^>^<string^> >>"%PLIST%" |
340 | ippfind "%1._ipps._tcp.local." -x echo adminurl="{txt_adminurl}" ";" >>"%PLIST%" | |
341 | ippfind "%1._ipps._tcp.local." -x echo pdl="{txt_pdl}" ";" >>"%PLIST%" | |
342 | ippfind "%1._ipps._tcp.local." -x echo rp="{txt_rp}" ";" >>"%PLIST%" | |
343 | ippfind "%1._ipps._tcp.local." -x echo TLS="{txt_tls}" ";" >>"%PLIST%" | |
344 | ippfind "%1._ipps._tcp.local." -x echo UUID="{txt_uuid}" ";" >>"%PLIST%" | |
345 | ippfind "%1._ipps._tcp.local." -x ipptool -t "{}" bonjour-value-tests.test ";" | findstr /r [TG][EO][DT]: >>"%PLIST" | |
346 | echo ^</string^>^</array^> >>"%PLIST%" | |
1b6d468c MS |
347 | ) |
348 | ) else ( | |
349 | set /a skip+=1 | |
b32e6256 | 350 | set result=SKIP |
1b6d468c | 351 | ) |
193013f9 | 352 | |
b32e6256 MS |
353 | echo %result% |
354 | if "%result%" == "FAIL" ( | |
355 | echo ^<key^>Successful^</key^>^<false /^> >>"%PLIST%" | |
356 | ||
357 | ippfind "%1._ipps._tcp.local." -x echo adminurl="{txt_adminurl}" ";" | |
358 | ippfind "%1._ipps._tcp.local." -x echo pdl="{txt_pdl}" ";" | |
359 | ippfind "%1._ipps._tcp.local." -x echo rp="{txt_rp}" ";" | |
360 | ippfind "%1._ipps._tcp.local." -x echo TLS="{txt_tls}" ";" | |
361 | ippfind "%1._ipps._tcp.local." -x echo UUID="{txt_uuid}" ";" | |
362 | ippfind "%1._ipp._tcp.local." -x ipptool -t "{}" bonjour-value-tests.test ";" | findstr /r [TG][EO][DT]: | |
363 | ) else ( | |
364 | if "%result%" == "SKIP" ( | |
365 | echo ^<key^>Successful^</key^>^<true /^> >>"%PLIST%" | |
366 | echo ^<key^>Skipped^</key^>^<true /^> >>"%PLIST%" | |
367 | ) else ( | |
368 | echo ^<key^>Successful^</key^>^<true /^> >>"%PLIST%" | |
369 | ) | |
370 | ) | |
371 | echo ^</dict^> >>"%PLIST%" | |
372 | ||
193013f9 | 373 | :: Finish up... |
b32e6256 MS |
374 | echo ^</array^> >>"%PLIST%" |
375 | echo ^<key^>Successful^</key^> >>"%PLIST%" | |
1b6d468c | 376 | if %fail% gtr 0 ( |
b32e6256 | 377 | echo ^<false /^> >>"%PLIST%" |
1b6d468c | 378 | ) else ( |
b32e6256 | 379 | echo ^<true /^> >>"%PLIST%" |
1b6d468c | 380 | ) |
b32e6256 MS |
381 | echo ^</dict^> >>"%PLIST%" |
382 | echo ^</plist^> >>"%PLIST%" | |
193013f9 | 383 | |
1b6d468c MS |
384 | set /a score=%pass% + %skip% |
385 | set /a score=100 * %score% / %total% | |
b32e6256 MS |
386 | echo Summary: %total% tests, %pass% passed, %fail% failed, %skip% skipped |
387 | echo Score: %score%%% | |
193013f9 MS |
388 | |
389 | :: | |
390 | :: End of "$Id$". | |
391 | :: |