Merge pull request #3714 from aviau/32bit_tests

Run 32bit tests in CircleCI + Added script to run them separately
pull/3749/head
Philip O'Toole 2015-08-19 14:27:51 -07:00
commit 990e21ccfc
4 changed files with 34 additions and 0 deletions

12
Dockerfile_test_ubuntu32 Normal file
View File

@ -0,0 +1,12 @@
FROM 32bit/ubuntu:14.04
RUN apt-get update && apt-get install -y python-software-properties software-properties-common git
RUN add-apt-repository ppa:evarlast/golang1.4
RUN apt-get update && apt-get install -y golang-go
ENV GOPATH=/root/go
RUN mkdir -p /root/go/src/github.com/influxdb/influxdb
RUN mkdir -p /tmp/artifacts
VOLUME /root/go/src/github.com/influxdb/influxdb
VOLUME /tmp/artifacts

View File

@ -53,6 +53,17 @@ case $CIRCLE_NODE_INDEX in
0)
go test $PARALLELISM $TIMEOUT -v ./... 2>&1 | tee $CIRCLE_ARTIFACTS/test_logs.txt
rc=${PIPESTATUS[0]}
if [[ $rc != 0 ]]; then
exit $rc
fi
# 32bit tests. (Could be run on a separate node instead)
exit_if_fail docker build -f Dockerfile_test_ubuntu32 -t ubuntu-32-influxdb-test .
docker run -v $(pwd):/root/go/src/github.com/influxdb/influxdb \
-v ${CIRCLE_ARTIFACTS}:/tmp/artifacts \
-t ubuntu-32-influxdb-test bash \
-c "cd /root/go/src/github.com/influxdb/influxdb && go get -t -d -v ./... && go build -v ./... && go test ${PARALLELISM} ${TIMEOUT} -v ./... 2>&1 | tee /tmp/artifacts/test_logs_i386.txt && exit \${PIPESTATUS[0]}"
rc=$?
;;
1)
GORACE="halt_on_error=1" go test $PARALLELISM $TIMEOUT -v -race ./... 2>&1 | tee $CIRCLE_ARTIFACTS/test_logs_race.txt

View File

@ -1,4 +1,6 @@
machine:
services:
- docker
pre:
- bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
- source $HOME/.gvm/scripts/gvm; gvm install go1.4.2 --binary
@ -6,6 +8,11 @@ machine:
dependencies:
override:
- echo "Dummy override, so no Circle dependencies execute"
- if [[ -e ~/docker/image.tar ]]; then docker load -i ~/docker/image.tar; fi
- docker build -f Dockerfile_test_ubuntu32 -t ubuntu-32-influxdb-test .
- mkdir -p ~/docker; docker save ubuntu-32-influxdb-test > ~/docker/image.tar
cache_directories:
- "~/docker"
test:
override:
- bash circle-test.sh:

4
test-32bit-docker.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
docker build -f Dockerfile_test_ubuntu32 -t ubuntu-32-influxdb-test .
docker run -v $(pwd):/root/go/src/github.com/influxdb/influxdb -t ubuntu-32-influxdb-test bash -c "cd /root/go/src/github.com/influxdb/influxdb && go get -t -d -v ./... && go build -v ./... && go test -v ./..."