source: NonGTP/Xerces/xerces/scripts/sanityTest.pl @ 358

Revision 358, 6.0 KB checked in by bittner, 19 years ago (diff)

xerces added

Line 
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
38if (lc($os) eq "win") {
39    $pathsep = "\\";
40}
41else {
42    $pathsep = "/";
43}
44
45chdir "samples".$pathsep."data";
46
47#
48#  Run the samples
49#
50
51#  Run SAXCount
52system ("SAXCount");
53system ("SAXCount -v=never personal.xml");
54system ("SAXCount personal.xml");
55system ("SAXCount -n -s personal-schema.xml");
56
57#  Run SAXPrint
58system ("SAXPrint");
59system ("SAXPrint -v=never personal.xml");
60system ("SAXPrint personal.xml");
61system ("SAXPrint -n -s personal-schema.xml");
62
63#  Run SAX2Count
64system ("SAX2Count");
65system ("SAX2Count -v=never personal.xml");
66system ("SAX2Count personal.xml");
67system ("SAX2Count -p personal-schema.xml");
68
69#  Run SAX2Print
70system ("SAX2Print");
71system ("SAX2Print -v=never personal.xml");
72system ("SAX2Print personal.xml");
73system ("SAX2Print -p personal-schema.xml");
74
75#  Run MemParse
76system ("MemParse");
77system ("MemParse -v=never");
78
79#  Run Redirect
80system ("Redirect");
81system ("Redirect personal.xml");
82
83#  Run DOMCount
84system ("DOMCount");
85system ("DOMCount -v=never personal.xml");
86system ("DOMCount personal.xml");
87system ("DOMCount -n -s personal-schema.xml");
88
89#  Run DOMPrint
90system ("DOMPrint");
91system ("DOMPrint -wfpp=on -wddc=off -v=never personal.xml");
92system ("DOMPrint -wfpp=on -wddc=off personal.xml");
93system ("DOMPrint -wfpp=on -wddc=on  personal.xml");
94system ("DOMPrint -wfpp=on -wddc=off -n -s personal-schema.xml");
95
96#  Run StdInParse
97system ("StdInParse < personal.xml");
98system ("StdInParse -v=never < personal.xml");
99system ("StdInParse -n -s < personal-schema.xml");
100
101#  Run PParse
102system ("PParse");
103system ("PParse personal.xml");
104system ("PParse -n -s personal-schema.xml");
105
106#  Run EnumVal
107system ("EnumVal");
108system ("EnumVal personal.xml");
109
110#  Run SEnumVal
111system ("SEnumVal");
112system ("SEnumVal personal-schema.xml");
113
114#  Run CreateDOMDocument
115system ("CreateDOMDocument");
116
117#
118#  Run the test cases
119#
120
121#  Run DOMMemTest
122print  ("DOMMemTest\n");
123system ("DOMMemTest");
124
125#  Run DOMTest
126print  ("DOMTest\n");
127system ("DOMTest");
128
129#  Run RangeTest
130print  ("RangeTest\n");
131system ("RangeTest");
132
133#  Run DOMTraversalTest
134print  ("DOMTraversalTest\n");
135system ("DOMTraversalTest");
136
137#  Run DeprecatedDOMCount
138system ("DeprecatedDOMCount");
139system ("DeprecatedDOMCount -v=never personal.xml");
140system ("DeprecatedDOMCount personal.xml");
141system ("DeprecatedDOMCount -n -s personal-schema.xml");
142
143#  Run XSerializerTest
144system ("XSerializerTest");
145system ("XSerializerTest -v=never  personal.xml");
146system ("XSerializerTest -v=always personal.xml");
147system ("XSerializerTest -v=never  personal-schema.xml");
148system ("XSerializerTest -v=always personal-schema.xml");
149system ("XSerializerTest -v=always -f personal-schema.xml");
150
151#  Run XSValueTest
152system ("XSValueTest");
153
154#  Run InitTestTerm
155system ("InitTermTest");
156print  ("1");
157system ("InitTermTest personal.xml");
158print  ("2");
159system ("InitTermTest -n -s personal-schema.xml");
160print  ("3");
161system ("InitTermTest -n -s -f personal-schema.xml");
162
163#  Run ThreadTest
164system ("ThreadTest");
165print  ("1");
166system ("ThreadTest -parser=sax -v=never -quiet -threads 10 -time 20 personal.xml");
167print  ("2");
168system ("ThreadTest -parser=dom -v=never -quiet -threads 10 -time 20 personal.xml");
169print  ("3");
170system ("ThreadTest -parser=sax2 -v=never -quiet -threads 10 -time 20 personal.xml");
171print  ("4");
172system ("ThreadTest -parser=sax -v=always -quiet -threads 10 -time 20 personal.xml");
173print  ("5");
174system ("ThreadTest -parser=dom -v=always -quiet -threads 10 -time 20 personal.xml");
175print  ("6");
176system ("ThreadTest -parser=sax2 -v=always -quiet -threads 10 -time 20 personal.xml");
177print  ("7");
178system ("ThreadTest -parser=sax -gc -v=always -quiet -threads 10 -time 20 personal.xml");
179print  ("8");
180system ("ThreadTest -parser=dom -gc -v=always -quiet -threads 10 -time 20 personal.xml");
181print  ("9");
182system ("ThreadTest -parser=sax2 -gc -v=always -quiet -threads 10 -time 20 personal.xml");
183print  ("10");
184system ("ThreadTest -parser=sax -n -s -f -v=always -quiet -threads 10 -time 20 personal-schema.xml");
185print  ("11");
186system ("ThreadTest -parser=dom -n -s -f -v=always -quiet -threads 10 -time 20 personal-schema.xml");
187print  ("12");
188system ("ThreadTest -parser=sax2 -n -s -f -v=always -quiet -threads 10 -time 20 personal-schema.xml");
189print  ("13");
190system ("ThreadTest -parser=sax -gc -n -s -f -v=always -quiet -threads 10 -time 20 personal-schema.xml");
191print  ("14");
192system ("ThreadTest -parser=dom -gc -n -s -f -v=always -quiet -threads 10 -time 20 personal-schema.xml");
193print  ("15");
194system ("ThreadTest -parser=sax2 -gc -n -s -f -v=always -quiet -threads 10 -time 20 personal-schema.xml");
195
196#  Run MemHandlerTest
197system ("MemHandlerTest");
198system ("MemHandlerTest -v=always -n -r=2 personal.xml");
199system ("MemHandlerTest -v=always -n -r=2 -s -f personal-schema.xml");
200
201chdir "..".$pathsep."..";
202
203chdir "tests".$pathsep."DOM".$pathsep."TypeInfo";
204system ("DOMTypeInfoTest");
205
206chdir "..".$pathsep."..";
207
Note: See TracBrowser for help on using the repository browser.