Skip to content

Add rule to sanity-check test/results/* as part of make results #8

@jnasbyupgrade

Description

@jnasbyupgrade

Here's how it was handled as a hack, but I think a much safer idea would be to incorporate this directly into the results recipe.

# WARNING! Position of this dependency is important! It needs to occur *after*
# the dependency on the "test" rule.
results: verify-results

.PHONY: verify-results
verify-results:
	@failed=0; \
	if grep -Hn '^not ok' test/results/*.out 2>/dev/null; then \
		failed=1; \
	fi; \
	if grep -Hn 'Looks like you planned' test/results/*.out 2>/dev/null; then \
		failed=1; \
	fi; \
	if [ $$failed -eq 1 ]; then \
		echo "ERROR: Failed tests found in results files (see above)"; \
		exit 1; \
	fi
	@echo "test/results/ files are clean (no 'not ok' lines or plan count mismatches found)"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions