Пример #1
0
    def _RunControl(self,
                    *args,
                    boards=None,
                    clean_dir=False,
                    test_thread_exceptions=False):
        """Run buildman

        Args:
            args: List of arguments to pass
            boards:
            clean_dir: Used for tests only, indicates that the existing output_dir
                should be removed before starting the build
            test_thread_exceptions: Uses for tests only, True to make the threads
                raise an exception instead of reporting their result. This simulates
                a failure in the code somewhere

        Returns:
            result code from buildman
        """
        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,
            test_thread_exceptions=test_thread_exceptions)
        self._builder = control.builder
        return result
Пример #2
0
 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
Пример #3
0
 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)
Пример #4
0
    result = unittest.TestResult()
    test_name = args and args[0] or None
    if skip_net_tests:
        test.use_network = False

    # Run the entry tests first ,since these need to be the first to import the
    # 'entry' module.
    test_util.run_test_suites(result, False, verboose, False, None, test_name,
                              [], [
                                  test.TestBuild, func_test.TestFunctional,
                                  'buildman.toolchain', 'patman.gitutil'
                              ])

    return test_util.report_result('buildman', test_name, result)


options, args = cmdline.ParseArgs()

if not options.debug:
    sys.tracebacklimit = 0

# Run our meagre tests
if options.test:
    RunTests(options.skip_net_tests, options.verbose, args)

# Build selected commits for selected boards
else:
    bsettings.Setup(options.config_file)
    ret_code = control.DoBuildman(options, args)
    sys.exit(ret_code)