1 | # |
---|
2 | # Licensed to the Apache Software Foundation (ASF) under one or more |
---|
3 | # contributor license agreements. See the NOTICE file distributed with |
---|
4 | # this work for additional information regarding copyright ownership. |
---|
5 | # The ASF licenses this file to You under the Apache License, Version 2.0 |
---|
6 | # (the "License"); you may not use this file except in compliance with |
---|
7 | # the License. You may obtain a copy of the License at |
---|
8 | # |
---|
9 | # http://www.apache.org/licenses/LICENSE-2.0 |
---|
10 | # |
---|
11 | # Unless required by applicable law or agreed to in writing, software |
---|
12 | # distributed under the License is distributed on an "AS IS" BASIS, |
---|
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
---|
14 | # See the License for the specific language governing permissions and |
---|
15 | # limitations under the License. |
---|
16 | # |
---|
17 | # |
---|
18 | |
---|
19 | # |
---|
20 | # $Id: sanityTest.pl 570125 2007-08-27 13:57:11Z amassari $ |
---|
21 | # |
---|
22 | |
---|
23 | |
---|
24 | # Author(s): Mike Strosaker |
---|
25 | # |
---|
26 | # Verify that a Xerces-C build is successful. |
---|
27 | # Command-Line Parameter: |
---|
28 | # The OS type ("win" or "unix") |
---|
29 | # |
---|
30 | # Prerequisites: |
---|
31 | # Set the path to include the appropriate executables |
---|
32 | # and the library path to include the libraries |
---|
33 | |
---|
34 | $os = $ARGV[0]; |
---|
35 | |
---|
36 | # flush output |
---|
37 | $| = 1; |
---|
38 | |
---|
39 | if (lc($os) eq "win") { |
---|
40 | $pathsep = "\\"; |
---|
41 | } |
---|
42 | else { |
---|
43 | $pathsep = "/"; |
---|
44 | } |
---|
45 | |
---|
46 | chdir "samples".$pathsep."data"; |
---|
47 | |
---|
48 | # |
---|
49 | # Run the samples |
---|
50 | # |
---|
51 | |
---|
52 | # Run SAXCount |
---|
53 | system ("SAXCount"); |
---|
54 | system ("SAXCount -v=never personal.xml"); |
---|
55 | system ("SAXCount personal.xml"); |
---|
56 | system ("SAXCount -n -s personal-schema.xml"); |
---|
57 | |
---|
58 | # Run SAXPrint |
---|
59 | system ("SAXPrint"); |
---|
60 | system ("SAXPrint -v=never personal.xml"); |
---|
61 | system ("SAXPrint personal.xml"); |
---|
62 | system ("SAXPrint -n -s personal-schema.xml"); |
---|
63 | |
---|
64 | # Run SAX2Count |
---|
65 | system ("SAX2Count"); |
---|
66 | system ("SAX2Count -v=never personal.xml"); |
---|
67 | system ("SAX2Count personal.xml"); |
---|
68 | system ("SAX2Count -p personal-schema.xml"); |
---|
69 | |
---|
70 | # Run SAX2Print |
---|
71 | system ("SAX2Print"); |
---|
72 | system ("SAX2Print -v=never personal.xml"); |
---|
73 | system ("SAX2Print personal.xml"); |
---|
74 | system ("SAX2Print -p personal-schema.xml"); |
---|
75 | system ("SAX2Print personal.xsd"); |
---|
76 | system ("SAX2Print -sa personal.xsd"); |
---|
77 | |
---|
78 | # Run MemParse |
---|
79 | system ("MemParse"); |
---|
80 | system ("MemParse -v=never"); |
---|
81 | |
---|
82 | # Run Redirect |
---|
83 | system ("Redirect"); |
---|
84 | system ("Redirect personal.xml"); |
---|
85 | |
---|
86 | # Run DOMCount |
---|
87 | system ("DOMCount"); |
---|
88 | system ("DOMCount -v=never personal.xml"); |
---|
89 | system ("DOMCount personal.xml"); |
---|
90 | system ("DOMCount -n -s personal-schema.xml"); |
---|
91 | |
---|
92 | # Run DOMPrint |
---|
93 | system ("DOMPrint"); |
---|
94 | system ("DOMPrint -wfpp=on -wddc=off -v=never personal.xml"); |
---|
95 | system ("DOMPrint -wfpp=on -wddc=off personal.xml"); |
---|
96 | system ("DOMPrint -wfpp=on -wddc=on personal.xml"); |
---|
97 | system ("DOMPrint -wfpp=on -wddc=off -n -s personal-schema.xml"); |
---|
98 | |
---|
99 | # Run StdInParse |
---|
100 | system ("StdInParse < personal.xml"); |
---|
101 | system ("StdInParse -v=never < personal.xml"); |
---|
102 | system ("StdInParse -n -s < personal-schema.xml"); |
---|
103 | |
---|
104 | # Run PParse |
---|
105 | system ("PParse"); |
---|
106 | system ("PParse personal.xml"); |
---|
107 | system ("PParse -n -s personal-schema.xml"); |
---|
108 | |
---|
109 | # Run EnumVal |
---|
110 | system ("EnumVal"); |
---|
111 | system ("EnumVal personal.xml"); |
---|
112 | |
---|
113 | # Run SEnumVal |
---|
114 | system ("SEnumVal"); |
---|
115 | system ("SEnumVal personal-schema.xml"); |
---|
116 | |
---|
117 | # Run CreateDOMDocument |
---|
118 | system ("CreateDOMDocument"); |
---|
119 | |
---|
120 | # |
---|
121 | # Run the test cases |
---|
122 | # |
---|
123 | |
---|
124 | # Run DOMMemTest |
---|
125 | print ("DOMMemTest\n"); |
---|
126 | system ("DOMMemTest"); |
---|
127 | |
---|
128 | # Run DOMTest |
---|
129 | print ("DOMTest\n"); |
---|
130 | system ("DOMTest"); |
---|
131 | |
---|
132 | # Run RangeTest |
---|
133 | print ("RangeTest\n"); |
---|
134 | system ("RangeTest"); |
---|
135 | |
---|
136 | # Run DOMTraversalTest |
---|
137 | print ("DOMTraversalTest\n"); |
---|
138 | system ("DOMTraversalTest"); |
---|
139 | |
---|
140 | # Run DeprecatedDOMCount |
---|
141 | system ("DeprecatedDOMCount"); |
---|
142 | system ("DeprecatedDOMCount -v=never personal.xml"); |
---|
143 | system ("DeprecatedDOMCount personal.xml"); |
---|
144 | system ("DeprecatedDOMCount -n -s personal-schema.xml"); |
---|
145 | |
---|
146 | # Run XSerializerTest |
---|
147 | system ("XSerializerTest"); |
---|
148 | system ("XSerializerTest -v=never personal.xml"); |
---|
149 | system ("XSerializerTest -v=always personal.xml"); |
---|
150 | system ("XSerializerTest -v=never personal-schema.xml"); |
---|
151 | system ("XSerializerTest -v=always personal-schema.xml"); |
---|
152 | system ("XSerializerTest -v=always -f personal-schema.xml"); |
---|
153 | |
---|
154 | # Run XSValueTest |
---|
155 | system ("XSValueTest"); |
---|
156 | |
---|
157 | # Run InitTestTerm |
---|
158 | system ("InitTermTest"); |
---|
159 | print ("1"); |
---|
160 | system ("InitTermTest personal.xml"); |
---|
161 | print ("2"); |
---|
162 | system ("InitTermTest -n -s personal-schema.xml"); |
---|
163 | print ("3"); |
---|
164 | system ("InitTermTest -n -s -f personal-schema.xml"); |
---|
165 | |
---|
166 | # Run ThreadTest |
---|
167 | system ("ThreadTest"); |
---|
168 | print ("1"); |
---|
169 | system ("ThreadTest -parser=sax -v=never -quiet -threads 10 -time 20 personal.xml"); |
---|
170 | print ("2"); |
---|
171 | system ("ThreadTest -parser=dom -v=never -quiet -threads 10 -time 20 personal.xml"); |
---|
172 | print ("3"); |
---|
173 | system ("ThreadTest -parser=sax2 -v=never -quiet -threads 10 -time 20 personal.xml"); |
---|
174 | print ("4"); |
---|
175 | system ("ThreadTest -parser=sax -v=always -quiet -threads 10 -time 20 personal.xml"); |
---|
176 | print ("5"); |
---|
177 | system ("ThreadTest -parser=dom -v=always -quiet -threads 10 -time 20 personal.xml"); |
---|
178 | print ("6"); |
---|
179 | system ("ThreadTest -parser=sax2 -v=always -quiet -threads 10 -time 20 personal.xml"); |
---|
180 | print ("7"); |
---|
181 | system ("ThreadTest -parser=sax -gc -v=always -quiet -threads 10 -time 20 personal.xml"); |
---|
182 | print ("8"); |
---|
183 | system ("ThreadTest -parser=dom -gc -v=always -quiet -threads 10 -time 20 personal.xml"); |
---|
184 | print ("9"); |
---|
185 | system ("ThreadTest -parser=sax2 -gc -v=always -quiet -threads 10 -time 20 personal.xml"); |
---|
186 | print ("10"); |
---|
187 | system ("ThreadTest -parser=sax -n -s -f -v=always -quiet -threads 10 -time 20 personal-schema.xml"); |
---|
188 | print ("11"); |
---|
189 | system ("ThreadTest -parser=dom -n -s -f -v=always -quiet -threads 10 -time 20 personal-schema.xml"); |
---|
190 | print ("12"); |
---|
191 | system ("ThreadTest -parser=sax2 -n -s -f -v=always -quiet -threads 10 -time 20 personal-schema.xml"); |
---|
192 | print ("13"); |
---|
193 | system ("ThreadTest -parser=sax -gc -n -s -f -v=always -quiet -threads 10 -time 20 personal-schema.xml"); |
---|
194 | print ("14"); |
---|
195 | system ("ThreadTest -parser=dom -gc -n -s -f -v=always -quiet -threads 10 -time 20 personal-schema.xml"); |
---|
196 | print ("15"); |
---|
197 | system ("ThreadTest -parser=sax2 -gc -n -s -f -v=always -quiet -threads 10 -time 20 personal-schema.xml"); |
---|
198 | |
---|
199 | # Run MemHandlerTest |
---|
200 | system ("MemHandlerTest"); |
---|
201 | system ("MemHandlerTest -v=always -n -r=2 personal.xml"); |
---|
202 | system ("MemHandlerTest -v=always -n -r=2 -s -f personal-schema.xml"); |
---|
203 | |
---|
204 | chdir "..".$pathsep.".."; |
---|
205 | |
---|
206 | chdir "tests".$pathsep."DOM".$pathsep."TypeInfo"; |
---|
207 | system ("DOMTypeInfoTest"); |
---|
208 | |
---|
209 | chdir "..".$pathsep.".."; |
---|
210 | |
---|