disable coverage (#23686)

* disable coverage

This reduces runtime of the server test suite from ~30m to ~10m, and as far as I can see: we discarded the coverage output anyway.

* allow morph 60s to migrate when running tests
This commit is contained in:
Jesse Hallam
2023-06-09 07:29:08 -03:00
committed by GitHub
parent 11c0a861b2
commit 8194817d54
4 changed files with 10 additions and 17 deletions

View File

@@ -2,8 +2,7 @@
set -e
[[ $1 =~ (github.com.*)/_test ]] && \
echo Testing ${BASH_REMATCH[1]}
coverprofile=`pwd`/cprofile.out
if [[ $1 == *"/enterprise/"* ]]; then
cd "$(dirname "$(dirname "${BASH_SOURCE[0]}")")"
fi
"$@" -test.coverprofile "$coverprofile"
"$@"

View File

@@ -10,7 +10,6 @@ TESTS=$4
TESTFLAGS=$5
GOBIN=$6
TIMEOUT=$7
COVERMODE=$8
PACKAGES_COMMA=$(echo $PACKAGES | tr ' ' ',')
export MM_SERVER_PATH=$PWD
@@ -23,15 +22,13 @@ then
export GOMAXPROCS=4
fi
find . -name 'cprofile*.out' -exec sh -c 'rm "{}"' \;
find . -type d -name data -not -path './data' | xargs rm -rf
$GO test $GOFLAGS -run=$TESTS $TESTFLAGS -v -timeout=$TIMEOUT -covermode=$COVERMODE -coverpkg=$PACKAGES_COMMA -exec $DIR/test-xprog.sh $PACKAGES 2>&1 > >( tee output )
$GO test $GOFLAGS -run=$TESTS $TESTFLAGS -v -timeout=$TIMEOUT -exec $DIR/test-xprog.sh $PACKAGES 2>&1 > >( tee output )
EXIT_STATUS=$?
cat output | $GOBIN/go-junit-report > report.xml
rm output
find . -name 'cprofile*.out' -exec sh -c 'tail -n +2 "{}" >> cover.out ; rm "{}"' \;
rm -f config/*.crt
rm -f config/*.key