2020-02-23 07:39:26 +03:00
|
|
|
dialects=("sqlite" "mysql" "postgres" "mssql")
|
2020-02-23 04:38:48 +03:00
|
|
|
|
|
|
|
if [[ $(pwd) == *"gorm/tests"* ]]; then
|
|
|
|
cd ..
|
|
|
|
fi
|
|
|
|
|
|
|
|
for dialect in "${dialects[@]}" ; do
|
|
|
|
if [ "$GORM_DIALECT" = "" ] || [ "$GORM_DIALECT" = "${dialect}" ]
|
|
|
|
then
|
2020-05-30 17:27:20 +03:00
|
|
|
echo "testing ${dialect}..."
|
|
|
|
|
2020-06-01 19:24:16 +03:00
|
|
|
race=""
|
2020-02-23 04:38:48 +03:00
|
|
|
if [ "$GORM_VERBOSE" = "" ]
|
|
|
|
then
|
2020-06-01 19:24:16 +03:00
|
|
|
race="-race"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$GORM_VERBOSE" = "" ]
|
|
|
|
then
|
|
|
|
DEBUG=false GORM_DIALECT=${dialect} go test $race -count=1 ./...
|
2020-06-02 05:34:50 +03:00
|
|
|
cd tests
|
|
|
|
DEBUG=false GORM_DIALECT=${dialect} go test $race -count=1 ./...
|
2020-02-23 04:38:48 +03:00
|
|
|
else
|
2020-06-01 19:24:16 +03:00
|
|
|
DEBUG=false GORM_DIALECT=${dialect} go test $race -count=1 -v ./...
|
2020-06-02 05:34:50 +03:00
|
|
|
cd tests
|
|
|
|
DEBUG=false GORM_DIALECT=${dialect} go test $race -count=1 -v ./...
|
2020-02-23 04:38:48 +03:00
|
|
|
fi
|
2020-06-02 05:34:50 +03:00
|
|
|
cd ..
|
2020-02-23 04:38:48 +03:00
|
|
|
fi
|
|
|
|
done
|