def _create_deploy_objects(self): '''Create deploy objects from the build and run lists. ''' # Create the build and run list first self._create_build_and_run_list() builds = [] build_map = {} for build in self.build_list: item = CompileSim(build, self) builds.append(item) build_map[build] = item self.builds = builds self.runs = ([] if self.build_only else self._expand_run_list(build_map)) if self.run_only is True: self.deploy = self.runs else: self.deploy = builds # Create cov_merge and cov_report objects if self.cov: self.cov_merge_deploy = CovMerge(self) self.cov_report_deploy = CovReport(self) # Generate reports only if merge was successful; add it as a dependency # of merge. self.cov_merge_deploy.sub.append(self.cov_report_deploy) # Create initial set of directories before kicking off the regression. self._create_dirs()
def _create_deploy_objects(self): '''Create deploy objects from the build and run lists. ''' # Create the build and run list first self._create_build_and_run_list() self.builds = [] build_map = {} for build_mode_obj in self.build_list: new_build = CompileSim(build_mode_obj, self) # It is possible for tests to supply different build modes, but # those builds may differ only under specific circumstances, # such as coverage being enabled. If coverage is not enabled, # then they may be completely identical. In that case, we can # save compute resources by removing the extra duplicated # builds. We discard the new_build if it is equivalent to an # existing one. is_unique = True for build in self.builds: if build.is_equivalent_job(new_build): new_build = build is_unique = False break if is_unique: self.builds.append(new_build) build_map[build_mode_obj] = new_build # Update all tests to use the updated (uniquified) build modes. for test in self.run_list: if test.build_mode.name != build_map[test.build_mode].name: test.build_mode = Modes.find_mode( build_map[test.build_mode].name, self.build_modes) self.runs = ([] if self.build_only else self._expand_run_list(build_map)) # Discard the build_job dependency that was added earlier if --run-only # switch is passed. if self.run_only: self.builds = [] for run in self.runs: run.dependencies = [] self.deploy = self.builds + self.runs # Create cov_merge and cov_report objects, so long as we've got at # least one run to do. if self.cov and self.runs: self.cov_merge_deploy = CovMerge(self.runs, self) self.cov_report_deploy = CovReport(self.cov_merge_deploy, self) self.deploy += [self.cov_merge_deploy, self.cov_report_deploy] # Create initial set of directories before kicking off the regression. self._create_dirs()
def _create_deploy_objects(self): '''Create deploy objects from the build and run lists. ''' # Create the build and run list first self._create_build_and_run_list() self.builds = [] build_map = {} for build_mode_obj in self.build_list: new_build = CompileSim(build_mode_obj, self) # It is possible for tests to supply different build modes, but # those builds may differ only under specific circumstances, such # as coverage being enabled. If coverage is not enabled, then they # may be completely identical. In that case, we can save compute # resources by removing the extra duplicated builds. We discard the # new_build if it is equivalent to an existing one. is_unique = True for build in self.builds: if build.is_equivalent_job(new_build): new_build = build is_unique = False break if is_unique: self.builds.append(new_build) build_map[build_mode_obj] = new_build # Update all tests to use the updated (uniquified) build modes. for test in self.run_list: if test.build_mode.name != build_map[test.build_mode].name: test.build_mode = Modes.find_mode( build_map[test.build_mode].name, self.build_modes) self.runs = ([] if self.build_only else self._expand_run_list(build_map)) self.deploy = self.runs if self.run_only else self.builds # Create cov_merge and cov_report objects if self.cov: self.cov_merge_deploy = CovMerge(self) self.cov_report_deploy = CovReport(self) # Generate reports only if merge was successful; add it as a dependency # of merge. self.cov_merge_deploy.sub.append(self.cov_report_deploy) # Create initial set of directories before kicking off the regression. self._create_dirs()