kubo/dockertest/Makefile
Juan Batiz-Benet 4c13b9585a dockertest script to run the test on any img
- run the build image task every time to avoid
  running the test on stale code
- run the test from a script, so that we can
  run the test on different pre-built images.
  like:

    # build an image now and run tests on it
    make test

    # run tests on previously built image
    ./run-test-on-img.sh ipfs-stable

    # TODO: run test on git ref
    ./run-test-on-git-ref.sh <git-ref>
2014-12-23 08:47:38 -08:00

35 lines
749 B
Makefile

RANDOMSRC = Godeps/_workspace/src/github.com/jbenet/go-random/random
IMAGE_NAME = ipfs-test-latest
test: clean setup
./run-test-on-img.sh $(IMAGE_NAME)
setup: docker_ipfs_image data/filetiny data/filerand
save_logs:
sh bin/save_logs.sh
data/filetiny: Makefile
cp Makefile ./data/filetiny # simple
data/filerand: bin/random
./bin/random 50000000 > ./data/filerand
bin/random:
go build -o ./bin/random ../$(RANDOMSRC)
# just build it every time... this part isn't
# even the lengthy part, and it decreases pain.
docker_ipfs_image:
cd .. && docker build -t $(IMAGE_NAME) .
docker images | grep $(IMAGE_NAME)
clean:
sh bin/clean.sh
fig stop
fig rm -v --force
rm -f bin/random
rm -f data/filetiny
rm -f data/filerand
rm -rf build/*