You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

210 lines
6.1 KiB

  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. # $Id: sanityTest.pl 696141 2008-09-17 03:06:33Z dbertoni $
  20. #
  21. # Author(s): Mike Strosaker
  22. #
  23. # Verify that a Xerces-C build is successful.
  24. # Command-Line Parameter:
  25. # The OS type ("win" or "unix")
  26. #
  27. # Prerequisites:
  28. # Set the path to include the appropriate executables
  29. # and the library path to include the libraries
  30. $os = $ARGV[0];
  31. # flush output
  32. $| = 1;
  33. if (lc($os) eq "win") {
  34. $pathsep = "\\";
  35. }
  36. else {
  37. $pathsep = "/";
  38. }
  39. chdir "samples".$pathsep."data";
  40. #
  41. # Run the samples
  42. #
  43. # Run SAXCount
  44. system ("SAXCount");
  45. system ("SAXCount -v=never personal.xml");
  46. system ("SAXCount personal.xml");
  47. system ("SAXCount -n -s personal-schema.xml");
  48. # Run SAXPrint
  49. system ("SAXPrint");
  50. system ("SAXPrint -v=never personal.xml");
  51. system ("SAXPrint personal.xml");
  52. system ("SAXPrint -n -s personal-schema.xml");
  53. # Run SAX2Count
  54. system ("SAX2Count");
  55. system ("SAX2Count -v=never personal.xml");
  56. system ("SAX2Count personal.xml");
  57. system ("SAX2Count -p personal-schema.xml");
  58. # Run SAX2Print
  59. system ("SAX2Print");
  60. system ("SAX2Print -v=never personal.xml");
  61. system ("SAX2Print personal.xml");
  62. system ("SAX2Print -p personal-schema.xml");
  63. system ("SAX2Print personal.xsd");
  64. system ("SAX2Print -sa personal.xsd");
  65. # Run MemParse
  66. system ("MemParse");
  67. system ("MemParse -v=never");
  68. # Run Redirect
  69. system ("Redirect");
  70. system ("Redirect personal.xml");
  71. # Run DOMCount
  72. system ("DOMCount");
  73. system ("DOMCount -v=never personal.xml");
  74. system ("DOMCount personal.xml");
  75. system ("DOMCount -n -s personal-schema.xml");
  76. # Run DOMPrint
  77. system ("DOMPrint");
  78. system ("DOMPrint -wfpp=on -wddc=off -v=never personal.xml");
  79. system ("DOMPrint -wfpp=on -wddc=off personal.xml");
  80. system ("DOMPrint -wfpp=on -wddc=on personal.xml");
  81. system ("DOMPrint -wfpp=on -wddc=off -n -s personal-schema.xml");
  82. system ("DOMPrint -v=never -xpath=//name personal.xml");
  83. # Run StdInParse
  84. system ("StdInParse < personal.xml");
  85. system ("StdInParse -v=never < personal.xml");
  86. system ("StdInParse -n -s < personal-schema.xml");
  87. # Run PParse
  88. system ("PParse");
  89. system ("PParse personal.xml");
  90. system ("PParse -n -s personal-schema.xml");
  91. # Run EnumVal
  92. system ("EnumVal");
  93. system ("EnumVal personal.xml");
  94. # Run SEnumVal
  95. system ("SEnumVal");
  96. system ("SEnumVal personal-schema.xml");
  97. # Run CreateDOMDocument
  98. system ("CreateDOMDocument");
  99. # Run SAXPrint. This tests long element names.
  100. print ("\nTest of a long element name.\n");
  101. system ("SAXPrint -v=never long.xml");
  102. print ("\n\n");
  103. #
  104. # Run the test cases
  105. #
  106. # Run DOMMemTest
  107. print ("DOMMemTest\n");
  108. system ("DOMMemTest");
  109. # Run DOMTest
  110. print ("DOMTest\n");
  111. system ("DOMTest");
  112. # Run RangeTest
  113. print ("RangeTest\n");
  114. system ("RangeTest");
  115. # Run DOMTraversalTest
  116. print ("DOMTraversalTest\n");
  117. system ("DOMTraversalTest");
  118. # Run XSerializerTest
  119. system ("XSerializerTest");
  120. system ("XSerializerTest -v=never personal.xml");
  121. system ("XSerializerTest -v=always personal.xml");
  122. system ("XSerializerTest -v=never personal-schema.xml");
  123. system ("XSerializerTest -v=always personal-schema.xml");
  124. system ("XSerializerTest -v=always -f personal-schema.xml");
  125. # Run XSValueTest
  126. system ("XSValueTest");
  127. # Run InitTestTerm
  128. system ("InitTermTest");
  129. print ("1");
  130. system ("InitTermTest personal.xml");
  131. print ("2");
  132. system ("InitTermTest -n -s personal-schema.xml");
  133. print ("3");
  134. system ("InitTermTest -n -s -f personal-schema.xml");
  135. # Run ThreadTest
  136. system ("ThreadTest");
  137. print ("1");
  138. system ("ThreadTest -parser=sax -v=never -quiet -threads 10 -time 20 personal.xml");
  139. print ("2");
  140. system ("ThreadTest -parser=dom -v=never -quiet -threads 10 -time 20 personal.xml");
  141. print ("3");
  142. system ("ThreadTest -parser=sax2 -v=never -quiet -threads 10 -time 20 personal.xml");
  143. print ("4");
  144. system ("ThreadTest -parser=sax -v=always -quiet -threads 10 -time 20 personal.xml");
  145. print ("5");
  146. system ("ThreadTest -parser=dom -v=always -quiet -threads 10 -time 20 personal.xml");
  147. print ("6");
  148. system ("ThreadTest -parser=sax2 -v=always -quiet -threads 10 -time 20 personal.xml");
  149. print ("7");
  150. system ("ThreadTest -parser=sax -gc -v=always -quiet -threads 10 -time 20 personal.xml");
  151. print ("8");
  152. system ("ThreadTest -parser=dom -gc -v=always -quiet -threads 10 -time 20 personal.xml");
  153. print ("9");
  154. system ("ThreadTest -parser=sax2 -gc -v=always -quiet -threads 10 -time 20 personal.xml");
  155. print ("10");
  156. system ("ThreadTest -parser=sax -n -s -f -v=always -quiet -threads 10 -time 20 personal-schema.xml");
  157. print ("11");
  158. system ("ThreadTest -parser=dom -n -s -f -v=always -quiet -threads 10 -time 20 personal-schema.xml");
  159. print ("12");
  160. system ("ThreadTest -parser=sax2 -n -s -f -v=always -quiet -threads 10 -time 20 personal-schema.xml");
  161. print ("13");
  162. system ("ThreadTest -parser=sax -gc -n -s -f -v=always -quiet -threads 10 -time 20 personal-schema.xml");
  163. print ("14");
  164. system ("ThreadTest -parser=dom -gc -n -s -f -v=always -quiet -threads 10 -time 20 personal-schema.xml");
  165. print ("15");
  166. system ("ThreadTest -parser=sax2 -gc -n -s -f -v=always -quiet -threads 10 -time 20 personal-schema.xml");
  167. # Run MemHandlerTest
  168. system ("MemHandlerTest");
  169. system ("MemHandlerTest -v=always -n -r=2 personal.xml");
  170. system ("MemHandlerTest -v=always -n -r=2 -s -f personal-schema.xml");
  171. chdir "..".$pathsep."..";
  172. chdir "tests".$pathsep."src".$pathsep."DOM".$pathsep."TypeInfo";
  173. system ("DOMTypeInfoTest");
  174. chdir "..".$pathsep."..";