* 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

* scripts/test.sh: drop COVERMODE

Stop generating coverage data when running unit tests. It's likely we'll want this data back at some point, but for now it's unused and removing simplifies invoking tests for developers.

* scripts/test.sh: remove cleanup steps

* scripts/test.sh: drop TESTS parameter

* scripts/test.sh: drop TESTFLAGS parameter

* switch to gotestsum
This commit is contained in:
Jesse Hallam
2023-06-15 15:27:52 -03:00
committed by GitHub
parent 6fae1736eb
commit 2765d92991
7 changed files with 146 additions and 100 deletions

View File

@@ -1,8 +0,0 @@
#!/usr/bin/env bash
set -e
[[ $1 =~ (github.com.*)/_test ]] && \
echo Testing ${BASH_REMATCH[1]}
if [[ $1 == *"/enterprise/"* ]]; then
cd "$(dirname "$(dirname "${BASH_SOURCE[0]}")")"
fi
"$@"

View File

@@ -1,35 +0,0 @@
#!/usr/bin/env bash
set -o pipefail
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
GO=$1
GOFLAGS=$2
PACKAGES=$3
TESTS=$4
TESTFLAGS=$5
GOBIN=$6
TIMEOUT=$7
PACKAGES_COMMA=$(echo $PACKAGES | tr ' ' ',')
export MM_SERVER_PATH=$PWD
echo "Packages to test: $PACKAGES"
echo "GOFLAGS: $GOFLAGS"
if [[ $GOFLAGS == "-race " && $IS_CI == "true" ]] ;
then
export GOMAXPROCS=4
fi
find . -type d -name data -not -path './data' | xargs rm -rf
$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
rm -f config/*.crt
rm -f config/*.key
exit $EXIT_STATUS