Skip to content

Commit

Permalink
Add bisect debug helper (#1102)
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott-Simmons authored Jan 14, 2025
1 parent d66fc0f commit 79e4ae9
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,16 @@ run-docker-tests:
clean:
rm -rf .tox build/ dist/ *.egg-info

bisect:
@if [ -z "$(GOOD_COMMIT)" ]; then \
echo "Error: GOOD_COMMIT is required. Usage: make bisect GOOD_COMMIT=<commit_hash>."; \
echo "Assumes that the current checked-out commit is a known bad commit, and bisects from there."; \
exit 1; \
fi
git bisect start
git bisect bad
git bisect good $(GOOD_COMMIT)
git bisect run pytest
git bisect reset

.PHONY: build-docker-testenv clean run-docker-tests test-all-testenv
.PHONY: build-docker-testenv clean run-docker-tests test-all-testenv bisect

0 comments on commit 79e4ae9

Please sign in to comment.