Commit 87c4fb2f authored by Juan Batiz-Benet's avatar Juan Batiz-Benet

Makefiles: build the test docker img

this commit changes how the dockertest image is built.
it moves the command into dockertest/Makefile. It also
uses a cached file that -- if removed with make clean
-- can signal whether the image should be rebuilt.
(it may be ideal to have it either detect code has
changed, or just rebuild every time. )
parent 497297b2
...@@ -18,7 +18,6 @@ test: test_go test_sharness ...@@ -18,7 +18,6 @@ test: test_go test_sharness
test_expensive: test_go_expensive test_sharness_expensive test_expensive: test_go_expensive test_sharness_expensive
test_docker: test_docker:
docker build -t zaqwsx_ipfs-test-img .
cd dockertest/ && make cd dockertest/ && make
test_go: test_go:
......
...@@ -14,9 +14,6 @@ setup: docker_ipfs_image data/filetiny data/filerand ...@@ -14,9 +14,6 @@ setup: docker_ipfs_image data/filetiny data/filerand
save_logs: save_logs:
sh bin/save_logs.sh sh bin/save_logs.sh
docker_ipfs_image:
docker images | grep $(IPFS_DOCKER_IMAGE)
data/filetiny: Makefile data/filetiny: Makefile
cp Makefile ./data/filetiny # simple cp Makefile ./data/filetiny # simple
...@@ -26,6 +23,16 @@ data/filerand: bin/random ...@@ -26,6 +23,16 @@ data/filerand: bin/random
bin/random: bin/random:
go build -o ./bin/random ../$(RANDOMSRC) go build -o ./bin/random ../$(RANDOMSRC)
docker_ipfs_image: build/.built_img
docker images | grep $(IPFS_DOCKER_IMAGE)
# this is here so that "make clean; make" rebuilds the docker img.
# but otherwise will reuse whatever you last built.
# TODO: make this detect whether code has been changed
build/.built_img:
cd .. && docker build -t $(IPFS_DOCKER_IMAGE) .
touch build/.built_img
clean: clean:
sh bin/clean.sh sh bin/clean.sh
fig stop fig stop
...@@ -34,3 +41,4 @@ clean: ...@@ -34,3 +41,4 @@ clean:
rm -f data/filetiny rm -f data/filetiny
rm -f data/filerand rm -f data/filerand
rm -rf build/* rm -rf build/*
rm -rf build/.built_img
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment