source: tests/scripts/checkxml.sh @ d9ba62a

Last change on this file since d9ba62a was d9ba62a, checked in by kytv <kytv@…>, 8 years ago

Update paths, add new files

  • Property mode set to 100755
File size: 5.0 KB
Line 
1#
2# Validate XML and HTML files using xmllint
3# Returns nonzero on failure
4#
5# Note that the news.xml and initialNews*.xml files are really HTML
6#
7# zzz 2011-03
8# public domain
9#
10
11cd `dirname $0`/../..
12
13XMLFILES="\
14./apps/addressbook/build.xml \
15./apps/addressbook/web.xml \
16./apps/BOB/build.xml \
17./apps/BOB/Demos/echo/echoclient/build.xml \
18./apps/BOB/Demos/echo/echoclient/nbproject/build-impl.xml \
19./apps/BOB/Demos/echo/echoclient/nbproject/private/private.xml \
20./apps/BOB/Demos/echo/echoclient/nbproject/project.xml \
21./apps/BOB/Demos/echo/echoserver/build.xml \
22./apps/BOB/Demos/echo/echoserver/nbproject/build-impl.xml \
23./apps/BOB/Demos/echo/echoserver/nbproject/private/private.xml \
24./apps/BOB/Demos/echo/echoserver/nbproject/project.xml \
25./apps/BOB/nbproject/build-impl.xml \
26./apps/BOB/nbproject/project.xml \
27./apps/desktopgui/build.xml \
28./apps/fortuna/build.xml \
29./apps/i2psnark/java/build.xml \
30./apps/i2psnark/jetty-i2psnark.xml \
31./apps/i2psnark/web.xml \
32./apps/i2ptunnel/java/build.xml \
33./apps/i2ptunnel/jsp/web.xml \
34./apps/jetty/build.xml \
35./apps/ministreaming/java/build.xml \
36./apps/routerconsole/java/build.xml \
37./apps/routerconsole/jsp/web.xml \
38./apps/sam/java/build.xml \
39./apps/streaming/java/build.xml \
40./apps/susidns/src/build.xml \
41./apps/susidns/src/WEB-INF/web-template.xml \
42./apps/susimail/build.xml \
43./apps/susimail/src/WEB-INF/web.xml \
44./apps/systray/java/build.xml \
45./build.xml \
46./core/java/build.xml \
47./core/java/nbproject/project.xml \
48./installer/i2pinstaller.xml \
49./installer/i2pstandalone.xml \
50./installer/install.xml \
51./installer/lib/launch4j/build.xml \
52./installer/resources/eepsite/jetty-ssl.xml
53./installer/resources/eepsite/contexts/cgi-context.xml
54./installer/resources/eepsite/contexts/base-context.xml
55./installer/resources/eepsite/jetty-rewrite.xml
56./installer/resources/eepsite/etc/webdefault.xml
57./installer/resources/eepsite/jetty-jmx.xml
58./installer/resources/eepsite/jetty.xml
59./installer/resources/shortcutSpec.xml \
60./router/java/build.xml \
61./Slackware/i2p-base/build.xml \
62./Slackware/i2p/build.xml"
63
64HTMLFILES="\
65./installer/resources/initialNews/*.xml \
66./installer/resources/news.xml \
67./apps/BOB/src/net/i2p/BOB/package.html \
68./apps/desktopgui/src/net/i2p/desktopgui/package.html \
69./apps/ministreaming/java/src/net/i2p/client/streaming/package.html \
70./apps/susidns/src/index.html \
71./apps/susimail/src/index.html \
72./core/java/src/net/i2p/client/datagram/package.html \
73./core/java/src/net/i2p/client/naming/package.html \
74./core/java/src/net/i2p/client/package.html \
75./core/java/src/net/i2p/crypto/package.html \
76./core/java/src/net/i2p/data/i2cp/package.html \
77./core/java/src/net/i2p/data/package.html \
78./core/java/src/net/i2p/internal/package.html \
79./core/java/src/net/i2p/package.html \
80./core/java/src/net/i2p/stat/package.html \
81./core/java/src/net/i2p/time/package.html \
82./core/java/src/net/i2p/util/package.html \
83./installer/resources/eepsite/docroot/help/index_de.html \
84./installer/resources/eepsite/docroot/help/index_fr.html \
85./installer/resources/eepsite/docroot/help/index.html \
86./installer/resources/eepsite/docroot/help/index_na.html \
87./installer/resources/eepsite/docroot/help/index_nl.html \
88./installer/resources/eepsite/docroot/help/index_ru.html \
89./installer/resources/eepsite/docroot/help/index_sv.html \
90./installer/resources/eepsite/docroot/help/pagetemplate.html \
91./installer/resources/eepsite/docroot/index.html \
92./installer/resources/readme/readme_ar.html \
93./installer/resources/readme/readme_de.html \
94./installer/resources/readme/readme_es.html \
95./installer/resources/readme/readme_fr.html \
96./installer/resources/readme/readme.html \
97./installer/resources/readme/readme_nl.html \
98./installer/resources/readme/readme_pt.html \
99./installer/resources/readme/readme_ru.html \
100./installer/resources/readme/readme_sv.html \
101./installer/resources/readme/readme_zh.html \
102./installer/resources/small/toolbar.html \
103./installer/resources/startconsole.html \
104./router/java/src/net/i2p/data/i2np/package.html \
105./router/java/src/net/i2p/router/package.html \
106./router/java/src/net/i2p/router/peermanager/package.html \
107./router/java/src/net/i2p/router/startup/package.html \
108./router/java/src/net/i2p/router/transport/ntcp/package.html \
109./router/java/src/net/i2p/router/transport/package.html \
110./router/java/src/net/i2p/router/transport/udp/package.html \
111./router/java/src/net/i2p/router/util/package.html"
112
113echo 'Checking XML files....................'
114for i in $XMLFILES
115do
116        echo "Checking $i ..."
117        xmllint --noout $i
118        if [ $? -ne 0 ]
119        then
120                echo "********* FAILED CHECK FOR $i *************"
121                FAIL=1
122        fi
123done
124
125echo 'Checking HTML files....................'
126for i in $HTMLFILES
127do
128        echo "Checking $i ..."
129        xmllint --html --noout $i
130        # FIXME html mode never exits with an error code
131        # ... but it does output errors
132        if [ $? -ne 0 ]
133        then
134                echo "********* FAILED CHECK FOR $i *************"
135                FAIL=1
136        fi
137done
138
139if [ "$FAIL" != "" ]
140then
141        echo "******** At least one file failed check *********"
142else
143        echo "All files passed"
144fi
145exit $FAIL
Note: See TracBrowser for help on using the repository browser.