def run_tests(short = True, medium=True, long=True): suites = zUnitTest.build_test_suites() skipif = False if short: print "Running short tests" skipif = not zUnitTest.run_suite(suites['short'], 'short', skipif) if medium: print "Running medium tests" skipif = not zUnitTest.run_suite(suites['medium'],'medium', skipif) if long: print "Running long tests" skipif = not zUnitTest.run_suite(suites['long'],'long', skipif) if not skipif: return True else: return False
def do_integrated_test(): zUnitTest.run_suite(suites['big'], 'big', False)
input = raw_input() input = input.lower() if 'c' == input: compile_and_setup() print "Must restart devtool to use the compiled code; exiting now." input = 'q' if '1' == input: run_tests(True,False,False) elif '2' == input: run_tests(True,True,True) elif '3' == input: run_tests(True,True,True) elif '4' == input: suites = zUnitTest.build_test_suites() zUnitTest.run_suite(suites['big'], 'big', False) elif 'g' == input: result = run_tests(True,True,False) if result: update_git() elif 'r' == input: import pstats print '===== Individual time =====' stats = pstats.Stats('../meta/profiledata') stats.strip_dirs().sort_stats('time').print_stats(15) print '===== Cumulitive time =====' stats.sort_stats('cumulative').print_stats(15) print 'Devtool completed.' except DevToolProblem as e: print "Encountered a problem. The error was:" print e.msg