mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-10 15:20:56 +00:00
Run integration tests under Docker
This commit is contained in:
parent
4ccfa98771
commit
3a8315971e
17
build.sh
17
build.sh
@ -2,7 +2,7 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
IFS=$'\n\t'
|
IFS=$'\n\t'
|
||||||
|
|
||||||
DOCKERIMGV=1.3.3-2
|
DOCKERIMGV=1.3.3-3
|
||||||
|
|
||||||
case "${1:-default}" in
|
case "${1:-default}" in
|
||||||
default)
|
default)
|
||||||
@ -116,6 +116,21 @@ case "${1:-default}" in
|
|||||||
sh -c './build.sh clean && STTRACE=all ./build.sh test-cov && ./build.sh all'
|
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"
|
echo "Unknown build command $1"
|
||||||
;;
|
;;
|
||||||
|
@ -29,11 +29,6 @@ RUN go get github.com/calmh/gonative \
|
|||||||
&& rm -rf go \
|
&& rm -rf go \
|
||||||
&& gonative -version $GOLANG_VERSION
|
&& gonative -version $GOLANG_VERSION
|
||||||
|
|
||||||
# Random build users needs to be able to create stuff in /go
|
|
||||||
|
|
||||||
RUN rm -rf /go/pkg \
|
|
||||||
&& chmod 777 /go
|
|
||||||
|
|
||||||
# Rebuild the special and missing versions
|
# Rebuild the special and missing versions
|
||||||
|
|
||||||
RUN bash -xec '\
|
RUN bash -xec '\
|
||||||
@ -56,3 +51,6 @@ RUN go get github.com/tools/godep \
|
|||||||
&& go get github.com/axw/gocov/gocov \
|
&& go get github.com/axw/gocov/gocov \
|
||||||
&& go get github.com/AlekSi/gocov-xml
|
&& go get github.com/AlekSi/gocov-xml
|
||||||
|
|
||||||
|
# Random build users needs to be able to create stuff in /go
|
||||||
|
|
||||||
|
RUN chmod -R 777 /go/bin /go/pkg /go/src
|
||||||
|
Loading…
Reference in New Issue
Block a user