MCPcopy Create free account
hub / github.com/Kitware/VTK / main

Function main

Wrapping/Python/vtkmodules/test/Testing.py:377–410  ·  view source on GitHub ↗

Pass a list of tuples containing test classes and the starting string of the functions used for testing. Example: main ([(vtkTestClass, 'test'), (vtkTestClass1, 'test')])

(cases)

Source from the content-addressed store, hash-verified

375 return
376
377def main(cases):
378 """ Pass a list of tuples containing test classes and the starting
379 string of the functions used for testing.
380
381 Example:
382
383 main ([(vtkTestClass, 'test'), (vtkTestClass1, 'test')])
384 """
385
386 processCmdLine()
387
388 timer = vtkTimerLog()
389 s_time = timer.GetCPUTime()
390 s_wall_time = time.time()
391
392 # run the tests
393 result = test(cases)
394
395 tot_time = timer.GetCPUTime() - s_time
396 tot_wall_time = float(time.time() - s_wall_time)
397
398 # output measurements for CDash
399 print("<DartMeasurement name=\"WallTime\" type=\"numeric/double\"> "
400 " %f </DartMeasurement>"%tot_wall_time)
401 print("<DartMeasurement name=\"CPUTime\" type=\"numeric/double\"> "
402 " %f </DartMeasurement>"%tot_time)
403
404 # Delete these to eliminate debug leaks warnings.
405 del cases, timer
406
407 if result.wasSuccessful():
408 sys.exit(0)
409 else:
410 sys.exit(1)
411
412
413def test(cases):

Callers 1

Testing.pyFile · 0.70

Calls 7

processCmdLineFunction · 0.85
GetCPUTimeMethod · 0.80
timeMethod · 0.80
testFunction · 0.70
vtkTimerLogClass · 0.50
printFunction · 0.50
exitMethod · 0.45

Tested by

no test coverage detected