Run integration tests under Docker
This commit is contained in:
17
build.sh
17
build.sh
@@ -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"
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user