def setUp(self): self.buildinfo = buildinfo.BuildInfo() # filesystem self.filesystem = fake_filesystem.FakeFilesystem() self.cb = builder.ConfigBuilder(self.buildinfo) self.cb._task_list = []
def RunBuild(self): """Perform the build.""" try: title.set_title() self._build_info.BeyondCorp() task_list = self._SetupTaskList() if not os.path.exists(task_list): root_path = FLAGS.config_root_path or '/' try: b = builder.ConfigBuilder(self._build_info) b.Start(out_file=task_list, in_path=root_path) except builder.ConfigBuilderError as e: # TODO: Migrate to GlazierError terminator.log_and_exit('Failed to build the task list', self._build_info, 4302, e) try: r = runner.ConfigRunner(self._build_info) r.Start(task_list=task_list) except runner.ConfigRunnerError as e: # TODO: Migrate to GlazierError terminator.log_and_exit('Failed to execute the task list', self._build_info, 4304, e) except KeyboardInterrupt: logging.info('KeyboardInterrupt detected, exiting.') sys.exit(1) except errors.GlazierError as e: terminator.log_and_exit(e.message, self._build_info, e.code, e.exception) except Exception as e: # pylint: disable=broad-except terminator.log_and_exit('Unknown Exception', self._build_info, 4000, e)
def RunBuild(self): """Perform the build.""" try: title.set_title() self._build_info.BeyondCorp() task_list = self._SetupTaskList() if not os.path.exists(task_list): root_path = FLAGS.config_root_path or '/' try: b = builder.ConfigBuilder(self._build_info) b.Start(out_file=task_list, in_path=root_path) except builder.ConfigBuilderError as e: _LogFatal(str(e), self._build_info) try: r = runner.ConfigRunner(self._build_info) r.Start(task_list=task_list) except runner.ConfigRunnerError as e: _LogFatal(str(e), self._build_info) except KeyboardInterrupt: _LogFatal('KeyboardInterrupt detected, exiting.', self._build_info, collect=False) except Exception: # pylint: disable=broad-except _LogFatal(traceback.format_exc(), self._build_info, 4000)
def RunBuild(self): """Perform the build.""" task_list = self._SetupTaskList() if not os.path.exists(task_list): root_path = FLAGS.config_root_path or '/' try: b = builder.ConfigBuilder(self._build_info) b.Start(out_file=task_list, in_path=root_path) except builder.ConfigBuilderError as e: self._LogFatal(str(e)) try: r = runner.ConfigRunner(self._build_info) r.Start(task_list=task_list) except runner.ConfigRunnerError as e: self._LogFatal(str(e))
def setUp(self): super(ConfigBuilderTest, self).setUp() self.buildinfo = buildinfo.BuildInfo() self.cb = builder.ConfigBuilder(self.buildinfo) self.cb._task_list = []