source: NonGTP/Xerces/xerces-c_2_8_0/scripts/sanityTest.pl @ 2674

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