Add toggle for skipping tests

This commit is contained in:
Adam Harrison committed 2016-09-29 11:35:01 +01:00
1 parent b45f138ff1
commit a9db631836
6 files changed
+15

No files matched your search

+5
View File
@@ -2,11 +2,15 @@
set -e set -e
echo "SKIP_TESTS=1" > "$STATE"
source "$STATE" source "$STATE"
sudo apt-get -q update && sudo apt-get -q install bc jq sudo apt-get -q update && sudo apt-get -q install bc jq
bin/setup-circleci-secrets "$SECRET_PASSWORD" bin/setup-circleci-secrets "$SECRET_PASSWORD"
mkdir -p $(dirname $SRCDIR) && cp -r $(pwd)/ $SRCDIR mkdir -p $(dirname $SRCDIR) && cp -r $(pwd)/ $SRCDIR
if [ -z "$SKIP_TESTS" ] ; then
cd $SRCDIR; git submodule update --init cd $SRCDIR; git submodule update --init
if [ "$CIRCLE_NODE_INDEX" = "0" ] ; then if [ "$CIRCLE_NODE_INDEX" = "0" ] ; then
cd $SRCDIR/test; ./gce.sh make_template cd $SRCDIR/test; ./gce.sh make_template
@@ -15,3 +19,4 @@ cd $SRCDIR/build
../tools/rebuild-image weaveworks/weavebuild . Dockerfile build.sh ../tools/rebuild-image weaveworks/weavebuild . Dockerfile build.sh
touch $SRCDIR/.build.uptodate touch $SRCDIR/.build.uptodate
sudo chown -R ubuntu /usr/local/go sudo chown -R ubuntu /usr/local/go
fi
+2
View File
@@ -4,10 +4,12 @@ set -e
source "$STATE" source "$STATE"
if [ -z "$SKIP_TESTS" ] ; then
docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
cd $SRCDIR cd $SRCDIR
make clean-bin make clean-bin
make publish make publish
fi
go get github.com/weaveworks/wordepress go get github.com/weaveworks/wordepress
cd /home/ubuntu/src/github.com/weaveworks/wordepress cd /home/ubuntu/src/github.com/weaveworks/wordepress
+2
View File
@@ -4,8 +4,10 @@ set -e
source "$STATE" source "$STATE"
if [ -z "$SKIP_TESTS" ] ; then
if [ "$CIRCLE_NODE_INDEX" = "0" ] ; then if [ "$CIRCLE_NODE_INDEX" = "0" ] ; then
go get github.com/mattn/goveralls go get github.com/mattn/goveralls
goveralls -repotoken $COVERALLS_REPO_TOKEN -coverprofile=$SRCDIR/test/profile.cov -service=circleci goveralls -repotoken $COVERALLS_REPO_TOKEN -coverprofile=$SRCDIR/test/profile.cov -service=circleci
cd $SRCDIR/test; cp coverage.* $CIRCLE_ARTIFACTS cd $SRCDIR/test; cp coverage.* $CIRCLE_ARTIFACTS
fi fi
fi
+2
View File
@@ -4,7 +4,9 @@ set -e
source "$STATE" source "$STATE"
if [ -z "$SKIP_TESTS" ] ; then
cd $SRCDIR/test cd $SRCDIR/test
eval $(./gce.sh hosts) eval $(./gce.sh hosts)
export COVERAGE=true export COVERAGE=true
./run_all.sh ./run_all.sh
fi
+2
View File
@@ -4,6 +4,8 @@ set -e
source "$STATE" source "$STATE"
if [ -z "$SKIP_TESTS" ] ; then
cd $SRCDIR/test cd $SRCDIR/test
./gce.sh destroy ./gce.sh destroy
test "$CIRCLE_NODE_INDEX" != "0" || (cd $SRCDIR/test; ./gen_coverage_reports.sh) test "$CIRCLE_NODE_INDEX" != "0" || (cd $SRCDIR/test; ./gen_coverage_reports.sh)
fi
+2
View File
@@ -4,6 +4,7 @@ set -e
source "$STATE" source "$STATE"
if [ -z "$SKIP_TESTS" ] ; then
cd $SRCDIR cd $SRCDIR
make lint make lint
COVERDIR=test/coverage make RM= tests COVERDIR=test/coverage make RM= tests
@@ -12,3 +13,4 @@ make testrunner
cd $SRCDIR/test cd $SRCDIR/test
./gce.sh setup && eval $(./gce.sh hosts) && ./setup.sh ./gce.sh setup && eval $(./gce.sh hosts) && ./setup.sh
fi