def _RunControl(self, *args, **kwargs): sys.argv = [sys.argv[0]] + list(args) options, args = cmdline.ParseArgs() result = control.DoBuildman(options, args, toolchains=self._toolchains, make_func=self._HandleMake, boards=self._boards, clean_dir=kwargs.get('clean_dir', True)) self._builder = control.builder return result
def _RunControl(self, *args, clean_dir=False, boards=None): sys.argv = [sys.argv[0]] + list(args) options, args = cmdline.ParseArgs() result = control.DoBuildman(options, args, toolchains=self._toolchains, make_func=self._HandleMake, boards=boards or self._boards, clean_dir=clean_dir) self._builder = control.builder return result
def _testGit(self): """Test basic builder operation by building a branch""" options = Options() options.git = os.getcwd() options.summary = False options.jobs = None options.dry_run = False #options.git = os.path.join(self.base_dir, 'repo') options.branch = 'test-buildman' options.force_build = False options.list_tool_chains = False options.count = -1 options.git_dir = None options.threads = None options.show_unknown = False options.quick = False options.show_errors = False options.keep_outputs = False args = ['tegra20'] control.DoBuildman(options, args)
help='Show boards with unknown build result') parser.add_option( '-o', '--output-dir', type='string', dest='output_dir', default='..', help= 'Directory where all builds happen and buildman has its workspace (default is ../)' ) parser.usage = """buildman -b <branch> [options] Build U-Boot for all commits in a branch. Use -n to do a dry run""" (options, args) = parser.parse_args() # Run our meagre tests if options.test: RunTests() elif options.full_help: pager = os.getenv('PAGER') if not pager: pager = 'more' fname = os.path.join(os.path.dirname(sys.argv[0]), 'README') command.Run(pager, fname) # Build selected commits for selected boards else: control.DoBuildman(options, args)
result = unittest.TestResult() for module in ['toolchain', 'gitutil']: suite = doctest.DocTestSuite(module) suite.run(result) sys.argv = [sys.argv[0]] if skip_net_tests: test.use_network = False for module in (test.TestBuild, func_test.TestFunctional): suite = unittest.TestLoader().loadTestsFromTestCase(module) suite.run(result) print result for test, err in result.errors: print err for test, err in result.failures: print err options, args = cmdline.ParseArgs() # Run our meagre tests if options.test: RunTests(options.skip_net_tests) # Build selected commits for selected boards else: bsettings.Setup(options.config_file) ret_code = control.DoBuildman(options, args) sys.exit(ret_code)