def test_send_fn(): client_info = dict(package='test-underway2', arch='fooarch2', success=True) results = (client_info, [], None) x = pbc.get_tagsets_for_package(rpc_url, 'test-underway2') assert len(x) == 0 pbc.send(rpc_url, results, hostname='testhost2', tags=('b_tag', )) x = pbc.get_tagsets_for_package(rpc_url, 'test-underway2') assert len(x) == 1
def test_send_fn(): client_info = dict(package='test-underway2', arch='fooarch2', success=True) results = (client_info, [], None) x = pbc.get_tagsets_for_package(rpc_url, 'test-underway2') assert len(x) == 0 pbc.send(rpc_url, results, hostname='testhost2', tags=('b_tag',)) x = pbc.get_tagsets_for_package(rpc_url, 'test-underway2') assert len(x) == 1
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)'
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)