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