Skip to content

Commit

Permalink
Disable build of OCIL for thin DS
Browse files Browse the repository at this point in the history
  • Loading branch information
Honny1 committed Feb 20, 2024
1 parent 4fe0f5f commit 241cac4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build-scripts/build_xccdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ def link_benchmark_per_profile(loader, args):
if not os.path.exists(args.per_profile_dir):
os.makedirs(args.per_profile_dir)

loader.off_ocil = True

for id_, benchmark in loader.get_benchmark_by_profile():
xccdftree = benchmark.to_xml_element(loader.env_yaml)
p = Paths_(
Expand All @@ -117,6 +119,8 @@ def link_benchmark_per_profile(loader, args):
)
link_benchmark(loader, xccdftree, p, benchmark)

loader.off_ocil = False


def main():
args = parse_args()
Expand Down
3 changes: 3 additions & 0 deletions ssg/build_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -1464,6 +1464,7 @@ def __init__(self, env_yaml, resolved_path):
self.benchmark = None
self.env_yaml = env_yaml
self.product_cpes = ProductCPEs()
self.off_ocil = False

def find_first_groups_ids(self, start_dir):
group_files = glob.glob(os.path.join(start_dir, "*", "group.yml"))
Expand Down Expand Up @@ -1568,6 +1569,8 @@ def _get_rules_from_benchmark(self, benchmark):
return [self.rules[rule_id] for rule_id in benchmark.get_rules_selected_in_all_profiles()]

def export_ocil_to_xml(self, benchmark=None):
if self.off_ocil:
return None
root = self._create_ocil_xml_skeleton()

if benchmark is None:
Expand Down

0 comments on commit 241cac4

Please sign in to comment.