manibuilder: Adapt TEST_REMOTE and TEST_REVISION defaults
If ${TEST_LOCAL} is set, adapt the default remote and revision
accordingly. Now this variable is all that is needed to test
a local flashrom commit, e.g.
$ make alpine:amd64-v3.7 TEST_LOCAL=~/flashrom
Change-Id: I435beb81fd05db25fa6b0a7b517d4c8b9b57ceea
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/70912
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
diff --git a/util/manibuilder/Makefile b/util/manibuilder/Makefile
index 9493f39..aff150f 100644
--- a/util/manibuilder/Makefile
+++ b/util/manibuilder/Makefile
@@ -49,9 +49,11 @@
$(filter %-xenial %-stretch,$(MULTIARCH_TAGS)): MAKEARGS+=CONFIG_JLINK_SPI=no
$(filter centos%,$(MULTIARCH_TAGS)): MAKEARGS+=WARNERROR=no
$(ALL_TAGS): export QUIET_SETUP=$(QUIET_TEST)
-$(ALL_TAGS): export TEST_REVISION?=master
-$(ALL_TAGS): export TEST_REMOTE?=origin
-$(ALL_TAGS): %: %-check-build mani-net
+$(ALL_TAGS): export TEST_REMOTE?=$(if $(TEST_LOCAL),\
+ git://mani-git/flashrom.git,\
+ origin)
+$(ALL_TAGS): export TEST_REVISION?=$(if $(TEST_LOCAL),HEAD,master)
+$(ALL_TAGS): %: %-check-build mani-net $(if $(TEST_LOCAL),local-git)
$(QUIET_TEST)docker rm -f mani_$(call ident,$*) >/dev/null 2>&1 || true
$(QUIET_TEST)\
docker run \