mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
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:
@@ -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"
|
||||
"$@"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user