From 79e4ae900f3e06097e3efe27362da66f2b76def7 Mon Sep 17 00:00:00 2001 From: Scott-Simmons <52365471+Scott-Simmons@users.noreply.github.com> Date: Wed, 15 Jan 2025 06:46:16 +1100 Subject: [PATCH] Add bisect debug helper (#1102) --- Makefile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ce6c3f55..9a599e9e 100644 --- a/Makefile +++ b/Makefile @@ -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=."; \ + 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