Run integration tests under Docker

This commit is contained in:
Jakob Borg
2014-11-23 22:30:29 +01:00
parent 4ccfa98771
commit 3a8315971e
2 changed files with 19 additions and 6 deletions

View File

@@ -2,7 +2,7 @@
set -euo pipefail
IFS=$'\n\t'
DOCKERIMGV=1.3.3-2
DOCKERIMGV=1.3.3-3
case "${1:-default}" in
default)
@@ -116,6 +116,21 @@ case "${1:-default}" in
sh -c './build.sh clean && STTRACE=all ./build.sh test-cov && ./build.sh all'
;;
docker-test)
docker run --rm -h syncthing-builder -u $(id -u) -t \
-v $(pwd):/tmp/syncthing \
syncthing/build:$DOCKERIMGV \
sh -euxc 'mkdir -p /go/src/github.com/syncthing \
&& cd /go/src/github.com/syncthing \
&& cp -r /tmp/syncthing syncthing \
&& cd syncthing \
&& ./build.sh clean \
&& ./build.sh \
&& export GOPATH=$(pwd)/Godeps/_workspace:$GOPATH \
&& cd test \
&& ./all.sh'
;;
*)
echo "Unknown build command $1"
;;