Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 19 lines (14 sloc) 562 Bytes
#!/bin/bash
#Don't do [set -e] because we want to get coverage stats out
storer_cid=`docker ps --all --quiet --filter "name=cyber-dojo-storer"`
docker exec ${storer_cid} sh -c "rm -rf /tmp/cyber-dojo/katas/*"
web_cid=`docker ps --all --quiet --filter "name=cyber-dojo-web"`
docker exec ${web_cid} sh -c "cd test && ./run.sh ${*}"
status=$?
# copy coverage stats out of container
my_dir="$( cd "$( dirname "${0}" )" && pwd )"
mkdir -p ${my_dir}/coverage
src=${web_cid}:/tmp/cyber-dojo/coverage/.
dst=${my_dir}/coverage/
docker cp ${src} ${dst}
exit ${status}