Only build test-tools when needed

This commit is contained in:
Tim Hockin 2022-03-17 10:06:11 -07:00
parent adf37ef5fd
commit e6a8014ba2
1 changed files with 6 additions and 3 deletions

View File

@ -192,9 +192,12 @@ test: $(BUILD_DIRS)
" "
@./test_e2e.sh @./test_e2e.sh
test-tools: TEST_TOOLS := $(shell ls _test_tools)
@docker build -t $(REGISTRY)/test/test-sshd _test_tools/sshd test-tools: $(foreach tool, $(TEST_TOOLS), .container.test_tool.$(tool))
@docker build -t $(REGISTRY)/test/test-ncsvr _test_tools/ncsvr
.container.test_tool.%: _test_tools/% _test_tools/%/*
@docker build -t $(REGISTRY)/test/$$(basename $<) $<
@docker images -q $(REGISTRY)/test/$$(basename $<) > $@
# Help set up multi-arch build tools. This assumes you have the tools # Help set up multi-arch build tools. This assumes you have the tools
# installed. If you already have a buildx builder available, you don't need # installed. If you already have a buildx builder available, you don't need