/[escript]/trunk/pyvisi/test/python/all_test.py
ViewVC logotype

Contents of /trunk/pyvisi/test/python/all_test.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2367 - (show annotations)
Mon Apr 6 04:51:49 2009 UTC (13 years, 2 months ago) by jfenwick
File MIME type: text/x-python
File size: 15206 byte(s)
Added version number to deb files.
Fixed tests to check for ppmtompeg before running
1
2 ########################################################
3 #
4 # Copyright (c) 2003-2008 by University of Queensland
5 # Earth Systems Science Computational Center (ESSCC)
6 # http://www.uq.edu.au/esscc
7 #
8 # Primary Business: Queensland, Australia
9 # Licensed under the Open Software License version 3.0
10 # http://www.opensource.org/licenses/osl-3.0.php
11 #
12 ########################################################
13
14 __copyright__="""Copyright (c) 2003-2008 by University of Queensland
15 Earth Systems Science Computational Center (ESSCC)
16 http://www.uq.edu.au/esscc
17 Primary Business: Queensland, Australia"""
18 __license__="""Licensed under the Open Software License version 3.0
19 http://www.opensource.org/licenses/osl-3.0.php"""
20 __url__="https://launchpad.net/escript-finley"
21
22 from run_camera import TestCamera2D, TestCamera3D
23 from run_carpet import TestCarpetScalarWarp, TestCarpetVectorWarp
24 from run_carpet_with_lazy_evaluation import TestCarpet
25 from run_contour import TestContour
26 from run_contour_with_lazy_evaluation import TestContourGenerate, \
27 TestContourOnPlaneCut, TestContourOnPlaneClip
28 from run_datacollector import TestSourceXml2DPointData, \
29 TestSourceXml2DCellData,TestSourceXml3DPointData, \
30 TestSourceXml3DCellData
31 from run_ellipsoid import TestEllipsoid
32 from run_ellipsoid_with_lazy_evaluation import TestEllipsoidScaleResolution, \
33 TestEllipsoidOnPlaneCut, TestEllipsoidOnPlaneClip
34 from run_escript_with_lazy_evaluation import TestEscriptMap, \
35 TestEscriptVelocity, TestEscriptEllipsoid
36 from run_image import TestImageOnAMap
37 from run_image_with_lazy_evaluation import TestImage
38 from run_light import TestLight2D, TestLight3D
39 from run_logo import TestAccessLogo
40 from run_logo_with_lazy_evaluation import TestLogo
41 from run_map import TestMapOneViewport, TestMapFourViewports, \
42 TestMap2DCellDataWithCellToPointConversion, \
43 TestMap2DCellDataWithoutCellToPointConversion, TestMap3DPointData, \
44 TestMap3DCellDataWithCellToPointConversion, \
45 TestMap3DCellDataWithoutCellToPointConversion, TestMap3DSecondOrder, \
46 TestMapGreyScaleLut, TestMapOnPlaneCut, TestMapOnPlaneClip, \
47 TestMapOnScalarClip, \
48 TestMapOnScalarClipWithRotation
49 from run_map_with_lazy_evaluation import TestMapLazy, TestMapOnPlaneCutLazy, \
50 TestMapOnPlaneClipLazy, TestMapOnScalarClipLazy, \
51 TestMapOnScalarClipWithRotationLazy
52 from run_scene import TestSceneOneViewport, TestSceneFourViewports, TestSceneInit
53 from run_streamline import TestStreamLinePointSource, TestStreamLineModule, \
54 TestStreamLineTube
55 from run_streamline_with_lazy_evaluation import TestStreamLine
56 from run_text import TestText2D
57 from run_velocity import TestVelocity2DArrowVectorColor, \
58 TestVelocity2DArrowScalarColor, TestVelocity3DSecondOrder
59 from run_velocity_with_lazy_evaluation import TestVelocity, TestVelocityOnPlaneCut, TestVelocityOnPlaneClip
60 from run_exporter import TestVRMLExporter, TestIVExporter
61 from run_legend import TestLegend
62 from run_legend_with_lazy_evaluation import TestLegendWithLazyEvaluation
63 from run_movie_with_lazy_evaluation import TestGenerateMovie
64 from run_rectangle import TestRectangleOnAMap
65 from esys.escript import getMPISizeWorld, MPIBarrierWorld
66
67 import unittest
68
69
70
71 if __name__ == '__main__':
72 suite = unittest.TestSuite()
73 if getMPISizeWorld() == 1:
74 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestCamera2D))
75 else:
76 print "test TestCamera2D is dropped as MPI size > 1"
77 if getMPISizeWorld() == 1:
78 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestCamera3D))
79 else:
80 print "test TestCamera3D is dropped as MPI size > 1"
81 if getMPISizeWorld() == 1:
82 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestCarpetScalarWarp))
83 else:
84 print "test TestCarpetScalarWarp is dropped as MPI size > 1"
85 if getMPISizeWorld() == 1:
86 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestCarpetVectorWarp))
87 else:
88 print "test TestCarpetVectorWarp is dropped as MPI size > 1"
89 if getMPISizeWorld() == 1:
90 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestContour))
91 else:
92 print "test TestContour is dropped as MPI size > 1"
93 if getMPISizeWorld() == 1:
94 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestCarpet))
95 else:
96 print "test TestCarpet is dropped as MPI size > 1"
97 if getMPISizeWorld() == 1:
98 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestContourGenerate))
99 else:
100 print "test TestContourGenerate is dropped as MPI size > 1"
101 if getMPISizeWorld() == 1:
102 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestContourOnPlaneCut))
103 else:
104 print "test TestContourOnPlaneCut is dropped as MPI size > 1"
105 if getMPISizeWorld() == 1:
106 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestContourOnPlaneClip))
107 else:
108 print "test TestContourOnPlaneClip is dropped as MPI size > 1"
109 if getMPISizeWorld() == 1:
110 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestSourceXml2DPointData))
111 else:
112 print "test TestSourceXml2DPointData is dropped as MPI size > 1"
113 if getMPISizeWorld() == 1:
114 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestSourceXml2DCellData))
115 else:
116 print "test TestSourceXml2DCellData is dropped as MPI size > 1"
117 if getMPISizeWorld() == 1:
118 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestSourceXml3DPointData))
119 else:
120 print "test TestSourceXml3DPointData is dropped as MPI size > 1"
121 if getMPISizeWorld() == 1:
122 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestSourceXml3DCellData))
123 else:
124 print "test TestSourceXml3DCellData is dropped as MPI size > 1"
125 if getMPISizeWorld() == 1:
126 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestEllipsoid))
127 else:
128 print "test TestEllipsoid is dropped as MPI size > 1"
129 if getMPISizeWorld() == 1:
130 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestEllipsoidScaleResolution))
131 else:
132 print "test TestEllipsoidScaleResolution is dropped as MPI size > 1"
133 if getMPISizeWorld() == 1:
134 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestEllipsoidOnPlaneCut))
135 else:
136 print "test TestEllipsoidOnPlaneCut is dropped as MPI size > 1"
137 if getMPISizeWorld() == 1:
138 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestEllipsoidOnPlaneClip))
139 else:
140 print "test TestEllipsoidOnPlaneClip is dropped as MPI size > 1"
141 if getMPISizeWorld() == 1:
142 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestImageOnAMap))
143 else:
144 print "test TestImageOnAMap is dropped as MPI size > 1"
145 if getMPISizeWorld() == 1:
146 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestImage))
147 else:
148 print "test TestImage is dropped as MPI size > 1"
149 if getMPISizeWorld() == 1:
150 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestLight2D))
151 else:
152 print "test TestLight2D is dropped as MPI size > 1"
153 if getMPISizeWorld() == 1:
154 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestLight3D))
155 else:
156 print "test TestLight3D is dropped as MPI size > 1"
157 if getMPISizeWorld() == 1:
158 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestAccessLogo))
159 else:
160 print "test TestAccessLogo is dropped as MPI size > 1"
161 if getMPISizeWorld() == 1:
162 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestLogo))
163 else:
164 print "test TestLogo is dropped as MPI size > 1"
165 if getMPISizeWorld() == 1:
166 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestMapOneViewport))
167 else:
168 print "test TestMapOneViewport is dropped as MPI size > 1"
169 if getMPISizeWorld() == 1:
170 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestMapFourViewports))
171 else:
172 print "test TestMapFourViewports is dropped as MPI size > 1"
173 if getMPISizeWorld() == 1:
174 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestMap2DCellDataWithCellToPointConversion))
175 else:
176 print "test TestMap2DCellDataWithCellToPointConversion is dropped as MPI size > 1"
177 if getMPISizeWorld() == 1:
178 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestMap2DCellDataWithoutCellToPointConversion))
179 else:
180 print "test TestMap2DCellDataWithoutCellToPointConversion is dropped as MPI size > 1"
181 if getMPISizeWorld() == 1:
182 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestMap3DPointData))
183 else:
184 print "test TestMap3DPointData is dropped as MPI size > 1"
185 if getMPISizeWorld() == 1:
186 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestMap3DCellDataWithCellToPointConversion))
187 else:
188 print "test TestMap3DCellDataWithCellToPointConversion is dropped as MPI size > 1"
189 if getMPISizeWorld() == 1:
190 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestMap3DCellDataWithoutCellToPointConversion))
191 else:
192 print "test TestMap3DCellDataWithoutCellToPointConversion is dropped as MPI size > 1"
193 if getMPISizeWorld() == 1:
194 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestMapGreyScaleLut))
195 else:
196 print "test TestMapGreyScaleLut is dropped as MPI size > 1"
197 if getMPISizeWorld() == 1:
198 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestMapOnPlaneCut))
199 else:
200 print "test TestMapOnPlaneCut is dropped as MPI size > 1"
201 if getMPISizeWorld() == 1:
202 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestMapOnPlaneClip))
203 else:
204 print "test TestMapOnPlaneClip is dropped as MPI size > 1"
205 if getMPISizeWorld() == 1:
206 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestMapOnScalarClip))
207 else:
208 print "test TestMapOnScalarClip is dropped as MPI size > 1"
209 if getMPISizeWorld() == 1:
210 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestMapOnScalarClipWithRotation))
211 else:
212 print "test TestMapOnScalarClipWithRotation is dropped as MPI size > 1"
213 if getMPISizeWorld() == 1:
214 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestMap3DSecondOrder))
215 else:
216 print "test TestMap3DSecondOrder is dropped as MPI size > 1"
217 if getMPISizeWorld() == 1:
218 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestMapLazy))
219 else:
220 print "test TestMapLazy is dropped as MPI size > 1"
221 if getMPISizeWorld() == 1:
222 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestMapOnPlaneCutLazy))
223 else:
224 print "test TestMapOnPlaneCutLazy is dropped as MPI size > 1"
225 if getMPISizeWorld() == 1:
226 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestMapOnPlaneClipLazy))
227 else:
228 print "test TestMapOnPlaneClipLazy is dropped as MPI size > 1"
229 if getMPISizeWorld() == 1:
230 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestMapOnScalarClipLazy))
231 else:
232 print "test TestMapOnScalarClipLazy is dropped as MPI size > 1"
233 if getMPISizeWorld() == 1:
234 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestMapOnScalarClipWithRotationLazy))
235 else:
236 print "test TestMapOnScalarClipWithRotationLazy is dropped as MPI size > 1"
237 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestSceneInit))
238 if getMPISizeWorld() == 1:
239 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestSceneOneViewport))
240 else:
241 print "test TestSceneOneViewport is dropped as MPI size > 1"
242 if getMPISizeWorld() == 1:
243 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestSceneFourViewports))
244 else:
245 print "test TestSceneFourViewports is dropped as MPI size > 1"
246 if getMPISizeWorld() == 1:
247 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestText2D))
248 else:
249 print "test TestText2D is dropped as MPI size > 1"
250 if getMPISizeWorld() == 1:
251 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestVelocity2DArrowScalarColor))
252 else:
253 print "test TestVelocity2DArrowScalarColor is dropped as MPI size > 1"
254 if getMPISizeWorld() == 1:
255 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestVelocity2DArrowVectorColor))
256 else:
257 print "test TestVelocity2DArrowVectorColor is dropped as MPI size > 1"
258 if getMPISizeWorld() == 1:
259 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestVelocity3DSecondOrder))
260 else:
261 print "test TestVelocity3DSecondOrder is dropped as MPI size > 1"
262 if getMPISizeWorld() == 1:
263 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestVelocity))
264 else:
265 print "test TestVelocity is dropped as MPI size > 1"
266 if getMPISizeWorld() == 1:
267 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestVelocityOnPlaneCut))
268 else:
269 print "test TestVelocityOnPlaneCut is dropped as MPI size > 1"
270 if getMPISizeWorld() == 1:
271 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestVelocityOnPlaneClip))
272 else:
273 print "test TestStreamLinePointSource is dropped as MPI size > 1"
274 if getMPISizeWorld() == 1:
275 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestStreamLinePointSource))
276 else:
277 print "test TestStreamLineModule is dropped as MPI size > 1"
278 if getMPISizeWorld() == 1:
279 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestStreamLineModule))
280 else:
281 print "test TestStreamLineTube is dropped as MPI size > 1"
282 if getMPISizeWorld() == 1:
283 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestStreamLineTube))
284 else:
285 print "test TestStreamLine is dropped as MPI size > 1"
286 if getMPISizeWorld() == 1:
287 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestStreamLine))
288 else:
289 print "test TestEscriptMap is dropped as MPI size > 1"
290 if getMPISizeWorld() == 1:
291 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestEscriptMap))
292 else:
293 print "test TestEscriptVelocity is dropped as MPI size > 1"
294 if getMPISizeWorld() == 1:
295 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestEscriptVelocity))
296 else:
297 print "test TestEscriptEllipsoid is dropped as MPI size > 1"
298 if getMPISizeWorld() == 1:
299 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestEscriptEllipsoid))
300 else:
301 print "test TestVRMLExporter is dropped as MPI size > 1"
302 if getMPISizeWorld() == 1:
303 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestVRMLExporter))
304 else:
305 print "test TestIVExporter is dropped as MPI size > 1"
306 if getMPISizeWorld() == 1:
307 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestIVExporter))
308 else:
309 print "test TestLegend is dropped as MPI size > 1"
310 if getMPISizeWorld() == 1:
311 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestLegend))
312 else:
313 print "test TestLegendWithLazyEvaluation is dropped as MPI size > 1"
314 if getMPISizeWorld() == 1:
315 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestLegendWithLazyEvaluation))
316 else:
317 print "test TestGenerateMovie is dropped as MPI size > 1"
318 if getMPISizeWorld() == 1:
319 if os.system('ppmtompeg')/256==127:
320 print "test TestGenerateMovie is dropped as ppmtompeg is not available"
321 else:
322 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestGenerateMovie))
323 else:
324 print "test TestRectangleOnAMap is dropped as MPI size > 1"
325 if getMPISizeWorld() == 1:
326 suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestRectangleOnAMap))
327 else:
328 print "test TestRectangleOnAMap is dropped as MPI size > 1"
329 unittest.TextTestRunner(verbosity=2).run(suite)

  ViewVC Help
Powered by ViewVC 1.1.26