Make test execution not take quadratic compilation time (#7610)

* make test execution not take quadratic compilation time

* add -p flag. we can only test one package at a time (for now)

* cd to mattermost-server for enterprise

* whoops

* let's go ahead and make the coverage profiles ready for concurrent test
This commit is contained in:
Chris
2017-10-12 08:35:19 -07:00
committed by Christopher Speller
parent 3461a7b207
commit 785cc06f6e
2 changed files with 18 additions and 27 deletions

9
scripts/test-xprog.sh Executable file
View File

@@ -0,0 +1,9 @@
#!/usr/bin/env bash
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"