Makefile: Make sure BIN directory exist when running any test

This commit allows to run any test directly after checking out
the source code.
This commit is contained in:
Jean-Christophe Fillion-Robin 2016-09-26 00:21:16 -04:00
parent 79938b37e5
commit 606d0b3ed9
No known key found for this signature in database
GPG Key ID: 15C1A2812F958BD3

View File

@ -84,7 +84,6 @@ base: Dockerfile
$(DOCKER) build -t $(ORG)/base . $(DOCKER) build -t $(ORG)/base .
base.test: base base.test: base
mkdir -p $(BIN)
$(DOCKER) run --rm dockcross/base > $(BIN)/dockcross-base && chmod +x $(BIN)/dockcross-base $(DOCKER) run --rm dockcross/base > $(BIN)/dockcross-base && chmod +x $(BIN)/dockcross-base
# #
@ -109,4 +108,12 @@ $(addsuffix .test,$(STANDARD_IMAGES)): $$(basename $$@)
$(DOCKER) run --rm dockcross/$(basename $@) > $(BIN)/dockcross-$(basename $@) && chmod +x $(BIN)/dockcross-$(basename $@) $(DOCKER) run --rm dockcross/$(basename $@) > $(BIN)/dockcross-$(basename $@) && chmod +x $(BIN)/dockcross-$(basename $@)
$(BIN)/dockcross-$(basename $@) python test/run.py $($@_ARGS) $(BIN)/dockcross-$(basename $@) python test/run.py $($@_ARGS)
#
# testing prerequisites implicit rule
#
test.prerequisites:
mkdir -p $(BIN)
$(addsuffix .test,$(IMAGES)): test.prerequisites
.PHONY: base images $(IMAGES) test %.test .PHONY: base images $(IMAGES) test %.test