Skip to content

Commit

Permalink
Started doing failing check. Doesn't compare golden yet.
Browse files Browse the repository at this point in the history
  • Loading branch information
dkcumming committed Jan 21, 2025
1 parent 5314e1f commit bb2b3f3
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,22 @@ integration-test: build

golden:
make integration-test DIFF=">"

FAILING_DIR = $(CURDIR)/tests/integration/failing

.PHONY: check-failing
check-failing: SMIR ?= $(CURDIR)/run.sh -Z no-codegen
check-failing:
@mkdir -p $(TESTDIR) # Ensure passing directory exists
for rust in $(FAILING_DIR)/*.rs; do \
echo $${rust}; \
if ${SMIR} $${rust}; then \
target=$${rust%.rs}.smir.json.expected; \
mv $${rust} "$(TESTDIR)/"; \
mv $${target} "$(TESTDIR)/"; \
echo "Moved $${rust} to $(TESTDIR)/"; \
echo "Moved $${target} to $(TESTDIR)/"; \
else \
echo "Failed: $${rust} remains in $(FAILING_DIR)/"; \
fi \
done

0 comments on commit bb2b3f3

Please sign in to comment.