Skip to content

Commit

Permalink
Update module.mk
Browse files Browse the repository at this point in the history
  • Loading branch information
wandmagic committed Jan 16, 2025
1 parent 70405ef commit 0a382cb
Showing 1 changed file with 24 additions and 9 deletions.
33 changes: 24 additions & 9 deletions src/content/module.mk
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,33 @@ test-content:
.PHONY: test-dist-content
test-dist-content:
@echo "Validating Output files"
@for file in $(YAML_FILES); do \
@set -e; \
validation_failed=0; \
for file in $(YAML_FILES); do \
echo "Validating $$file..."; \
$(OSCAL_CLI) validate -f -s "$$file"; \
done
@for file in $(JSON_FILES); do \
if ! $(OSCAL_CLI) validate -f -s "$$file"; then \
echo "Error: Validation failed for YAML file: $$file"; \
validation_failed=1; \
fi; \
done; \
for file in $(JSON_FILES); do \
echo "Validating $$file..."; \
$(OSCAL_CLI) validate -f -s "$$file"; \
done
@for file in $(XML_FILES); do \
if ! $(OSCAL_CLI) validate -f -s "$$file"; then \
echo "Error: Validation failed for JSON file: $$file"; \
validation_failed=1; \
fi; \
done; \
for file in $(XML_FILES); do \
echo "Validating $$file..."; \
$(OSCAL_CLI) validate -f -s "$$file"; \
done
if ! $(OSCAL_CLI) validate -f -s "$$file"; then \
echo "Error: Validation failed for XML file: $$file"; \
validation_failed=1; \
fi; \
done; \
if [ $$validation_failed -eq 1 ]; then \
echo "One or more validations failed"; \
exit 1; \
fi

.PHONY: test-legacy-content
test-legacy-content: format
Expand Down

0 comments on commit 0a382cb

Please sign in to comment.