def do_autobuild(commands, name): server_url = options.server_url or default_server_url if not options.force_build: if not check(name, server_url, tags=tags): print 'check build says no need to build; bye' sys.exit(0) context = TempDirectoryContext(options.cleanup_temp) results = do(name, commands, context=context) client_info, reslist = results if options.report: print 'result: %s; sending' % (client_info['success'],) send(server_url, results, tags=tags) else: print 'build result:' import pprint pprint.pprint(client_info) pprint.pprint(reslist) print '(NOT SENDING BUILD RESULT TO SERVER)'
def test_exception_command(): c = Context() (client_info, _, _) = do('foo', [ExceptedCommand()], context=c) assert not client_info['success']
def test_failed_command(): c = Context() (client_info, _, _) = do('foo', [FailedCommand()], context=c) assert not client_info['success']
def test_context_failure(): c = FailedContextInit() (client_info, _, _) = do('foo', [SuccessfulCommand()], context=c) assert not client_info['success']
def test_successful_command(): c = Context() (client_info, _, _) = do('foo', [SuccessfulCommand()], context=c) assert client_info['success']
name = 'mechanize' tags = ['mechanize'] server_url = options.server_url if not options.force_build: if not check(name, server_url, tags=tags): print 'check build says no need to build; bye' sys.exit(0) commands = [ SvnCheckout('mechanize', repo_url, name='checkout'), BuildCommand([python_exe, 'setup.py', 'test']) ] context = TempDirectoryContext() results = do(name, commands, context=context) client_info, reslist, files = results if options.report: print 'result: %s; sending' % (client_info['success'], ) send(server_url, results, tags=tags) else: print 'build result:' pprint.pprint(client_info) pprint.pprint(reslist) print '(NOT SENDING BUILD RESULT TO SERVER)' if not client_info['success']: sys.exit(-1)
name = 'mechanize' tags = ['mechanize'] server_url = options.server_url if not options.force_build: if not check(name, server_url, tags=tags): print 'check build says no need to build; bye' sys.exit(0) commands = [ SvnCheckout('mechanize', repo_url, name='checkout'), BuildCommand([python_exe, 'setup.py', 'test']) ] context = TempDirectoryContext() results = do(name, commands, context=context) client_info, reslist, files = results if options.report: print 'result: %s; sending' % (client_info['success'],) send(server_url, results, tags=tags) else: print 'build result:' pprint.pprint(client_info) pprint.pprint(reslist) print '(NOT SENDING BUILD RESULT TO SERVER)' if not client_info['success']: sys.exit(-1)
def test_exception_command(): c = Context() (client_info, _, _) = do('foo', [ ExceptedCommand() ], context=c) assert not client_info['success']
def test_failed_command(): c = Context() (client_info, _, _) = do('foo', [ FailedCommand() ], context=c) assert not client_info['success']
def test_context_failure(): c = FailedContextInit() (client_info, _, _) = do('foo', [ SuccessfulCommand() ], context=c) assert not client_info['success']
def test_successful_command(): c = Context() (client_info, _, _) = do('foo', [ SuccessfulCommand() ], context=c) assert client_info['success']