diff --git a/jenkins-integration-build.sh b/jenkins-integration-build.sh index 28aa245f26..01aa5beb37 100755 --- a/jenkins-integration-build.sh +++ b/jenkins-integration-build.sh @@ -55,8 +55,6 @@ SG_COMMIT_HASH=$(git rev-parse HEAD) echo "Sync Gateway git commit hash: $SG_COMMIT_HASH" echo "Downloading tool dependencies..." -go install github.com/axw/gocov/gocov@latest -go install github.com/AlekSi/gocov-xml@latest go install gotest.tools/gotestsum@latest if [ "${SG_TEST_X509:-}" == "true" ] && [ "${COUCHBASE_SERVER_PROTOCOL}" != "couchbases" ]; then @@ -154,13 +152,6 @@ else cp integration.xml "${INT_LOG_FILE_NAME}.xml" fi -# Get coverage -~/go/bin/gocov convert "coverage_int.out" | ~/go/bin/gocov-xml > coverage_int.xml -if [ "${RUN_WALRUS:-}" == "true" ]; then - ~/go/bin/gocov convert "coverage_walrus_ee.out" | ~/go/bin/gocov-xml > "coverage_walrus_ee.xml" - ~/go/bin/gocov convert "coverage_walrus_ce.out" | ~/go/bin/gocov-xml > "coverage_walrus_ce.xml" -fi - if [ "${TEST_FAILED:-}" = true ]; then # If output contained `FAIL:` if grep -q 'FAIL:' "${INT_LOG_FILE_NAME}.out"; then diff --git a/test_with_coverage.sh b/test_with_coverage.sh deleted file mode 100755 index 776e534abb..0000000000 --- a/test_with_coverage.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash - -# Copyright 2017-Present Couchbase, Inc. -# -# Use of this software is governed by the Business Source License included in -# the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that -# file, in accordance with the Business Source License, use of this software -# will be governed by the Apache License, Version 2.0, included in the file -# licenses/APL2.txt. - - -## Go Tests -echo "Testing code with 'go test' ..." - -# Make sure gocoverutil is in path -path_to_gocoverutil=$(which gocoverutil) -if [ -x "$path_to_gocoverutil" ] ; then - echo "Using gocoverutil: $path_to_gocoverutil" -else - echo "Please install gocoverutil by running 'go get -u github.com/AlekSi/gocoverutil'" - exit 1 -fi - -set -e -set -x - -echo "Running Sync Gateway unit tests against Walrus" -SG_TEST_USE_XATTRS="false" SG_TEST_BACKING_STORE=Walrus gocoverutil -coverprofile=cover_sg.out test -shuffle=on -v "$@" -covermode=count ./... -go tool cover -html=cover_sg.out -o cover_sg.html - -echo "Running Sync Gateway integration unit tests (XATTRS=false)" -echo "Integration mode: tests to run in serial across packages by default using gocoverutil" -SG_TEST_USE_XATTRS="false" SG_TEST_BACKING_STORE=Couchbase gocoverutil -coverprofile=cover_sg_integration_xattrs_false.out test -shuffle=on -v "$@" -covermode=count ./... -go tool cover -html=cover_sg_integration_xattrs_false.out -o cover_sg_integration_xattrs_false.html - -echo "Running Sync Gateway integration unit tests (XATTRS=true)" -echo "Integration mode: tests to run in serial across packages by default using gocoverutil" -SG_TEST_USE_XATTRS="true" SG_TEST_BACKING_STORE=Couchbase gocoverutil -coverprofile=cover_sg_integration_xattrs_true.out test -shuffle=on -v "$@" -covermode=count ./... -go tool cover -html=cover_sg_integration_xattrs_true.out -o cover_sg_integration_xattrs_true.html - - -echo "Merging coverage reports" -gocoverutil -coverprofile=cover_sg_merged.out merge cover_sg.out cover_sg_integration_xattrs_false.out cover_sg_integration_xattrs_true.out -go tool cover -html=cover_sg_merged.out -o cover_sg_merged.html