Use race condition detection on sytest runs

This commit is contained in:
Andrew Morgan 2019-07-18 15:29:34 +01:00
parent 7f0a40c3a4
commit fe72cd8c56
2 changed files with 24 additions and 2 deletions

View file

@ -10,7 +10,7 @@ jobs:
# Set up dendrite
- run:
name: Build Dendrite
command: ./build.sh
command: ./build.sh -r
- run:
name: Copy dummy keys to root
command: |

View file

@ -1,3 +1,25 @@
#!/bin/sh
GOBIN=$PWD/`dirname $0`/bin go install -v ./cmd/...
ARGS="-v ./cmd/..."
usage() {
echo "Usage: $0 [-r]" 1>&2
echo
echo "-r"
echo " Build with race condition detection"
exit 1
}
while getopts ":r" o; do
case "${o}" in
r)
# Turn on race condition detection
ARGS="-race $ARGS"
;;
*)
usage
;;
esac
done
GOBIN=$PWD/`dirname $0`/bin go install $ARGS