コード例 #1
0
    def NativeClientFactory(self,
                            tests=None,
                            slave_type='BuilderTester',
                            official_release=False,
                            options=None,
                            factory_properties=None):
        factory_properties = factory_properties or {}
        options = options or {}
        tests = tests or []
        # Create the spec for the solutions
        gclient_spec = self.BuildGClientSpec(tests)
        # Initialize the factory with the basic steps.
        factory = self.BaseFactory(gclient_spec,
                                   official_release=official_release,
                                   factory_properties=factory_properties)
        # Get the factory command object to create new steps to the factory.
        nacl_cmd_obj = nacl_commands.NativeClientCommands(
            factory, self._build_dir, self._target_platform)

        # Upload expectations before running the tests to check against
        # the latest expectations.
        if factory_properties.get('expectations'):
            nacl_cmd_obj.AddUploadPerfExpectations(factory_properties)

        # Whole build in one step.
        nacl_cmd_obj.AddAnnotatedStep(['buildbot/buildbot_selector.py'],
                                      timeout=1500,
                                      usePython=True,
                                      env={'BUILDBOT_SLAVE_TYPE': slave_type},
                                      factory_properties=factory_properties)

        # Trigger tests on other builders.
        self._AddTriggerTests(nacl_cmd_obj, tests)

        return factory
コード例 #2
0
 def ModularBuildFactory(self,
                         modular_build_type,
                         target='Release',
                         tests=None,
                         slave_type='BuilderTester',
                         compile_timeout=1200,
                         official_release=False,
                         factory_properties=None):
     factory_properties = factory_properties or {}
     tests = tests or []
     # Create the spec for the solutions
     gclient_spec = self.BuildGClientSpec(tests)
     # Initialize the factory with the basic steps.
     factory = self.BaseFactory(gclient_spec,
                                official_release=official_release,
                                factory_properties=factory_properties)
     # Get the factory command object to create new steps to the factory.
     nacl_cmd_obj = nacl_commands.NativeClientCommands(
         factory, self._build_dir, self._target_platform)
     nacl_cmd_obj.AddModularBuildStep(modular_build_type,
                                      timeout=compile_timeout)
     return factory