Пример #1
0
 def build_all(self):
     """Builds the entire tree.  Returns the number of failures."""
     failures = 0
     path_cache = PathCache(self.env)
     # We keep a dummy connection here that does not do anything which
     # helps us with the WAL handling.  See #144
     con = self.connect_to_database()
     try:
         with reporter.build("build", self):
             self.env.plugin_controller.emit("before-build-all",
                                             builder=self)
             to_build = self.get_initial_build_queue()
             while to_build:
                 source = to_build.popleft()
                 prog, build_state = self.build(source,
                                                path_cache=path_cache)
                 self.extend_build_queue(to_build, prog)
                 failures += len(build_state.failed_artifacts)
             self.env.plugin_controller.emit("after-build-all",
                                             builder=self)
             if failures:
                 reporter.report_build_all_failure(failures)
         return failures
     finally:
         con.close()
Пример #2
0
 def build_all(self):
     """Builds the entire tree.  Returns the number of failures."""
     failures = 0
     path_cache = PathCache(self.env)
     # We keep a dummy connection here that does not do anything which
     # helps us with the WAL handling.  See #144
     con = self.connect_to_database()
     try:
         with reporter.build('build', self):
             self.env.plugin_controller.emit('before-build-all',
                                             builder=self)
             to_build = self.get_initial_build_queue()
             paraArgs = []
             while to_build:
                 # while to_build:
                 source = to_build.popleft()
                 # paraArgs.append({'builder': self, 'source': source, 'path_cache': path_cache})
                 prog, build_state = self.build(
                     source,
                     path_cache=path_cache)  # @@@@@LUKAS parallelize
                 # res = lukas_buildStuff(paraArgs) # @@@@@LUKAS parallelize
                 # for prog, build_state in res:
                 self.extend_build_queue(to_build, prog)
                 failures += len(build_state.failed_artifacts)
             self.env.plugin_controller.emit('after-build-all',
                                             builder=self)
             if failures:
                 reporter.report_build_all_failure(failures)
         return failures
     finally:
         con.close()
Пример #3
0
 def build_all(self):
     """Builds the entire tree.  Returns the number of failures."""
     failures = 0
     path_cache = PathCache(self.env)
     with reporter.build('build', self):
         self.env.plugin_controller.emit('before-build-all', builder=self)
         to_build = self.get_initial_build_queue()
         while to_build:
             source = to_build.popleft()
             prog, build_state = self.build(source, path_cache=path_cache)
             self.extend_build_queue(to_build, prog)
             failures += len(build_state.failed_artifacts)
         self.env.plugin_controller.emit('after-build-all', builder=self)
         if failures:
             reporter.report_build_all_failure(failures)
     return failures
Пример #4
0
 def build_all(self):
     """Builds the entire tree.  Returns the number of failures."""
     failures = 0
     path_cache = PathCache(self.env)
     with reporter.build('build', self):
         self.env.plugin_controller.emit('before-build-all', builder=self)
         to_build = self.get_initial_build_queue()
         while to_build:
             source = to_build.popleft()
             prog, build_state = self.build(source, path_cache=path_cache)
             self.extend_build_queue(to_build, prog)
             failures += len(build_state.failed_artifacts)
         self.env.plugin_controller.emit('after-build-all', builder=self)
         if failures:
             reporter.report_build_all_failure(failures)
     return failures
Пример #5
0
 def build_all(self):
     """Builds the entire tree.  Returns the number of failures."""
     failures = 0
     path_cache = PathCache(self.env)
     # We keep a dummy connection here that does not do anything which
     # helps us with the WAL handling.  See #144
     con = self.connect_to_database()
     try:
         with reporter.build('build', self):
             self.env.plugin_controller.emit('before-build-all', builder=self)
             to_build = self.get_initial_build_queue()
             while to_build:
                 source = to_build.popleft()
                 prog, build_state = self.build(source, path_cache=path_cache)
                 self.extend_build_queue(to_build, prog)
                 failures += len(build_state.failed_artifacts)
             self.env.plugin_controller.emit('after-build-all', builder=self)
             if failures:
                 reporter.report_build_all_failure(failures)
         return failures
     finally:
         con.close()