tests_all.sh 620 B

12345678910111213141516171819202122232425
  1. dialects=("postgres" "mysql" "mssql" "sqlite")
  2. if [[ $(pwd) == *"gorm/tests"* ]]; then
  3. cd ..
  4. fi
  5. for dialect in "${dialects[@]}" ; do
  6. if [ "$GORM_DIALECT" = "" ] || [ "$GORM_DIALECT" = "${dialect}" ]
  7. then
  8. if [ "$GORM_VERBOSE" = "" ]
  9. then
  10. cd dialects/${dialect}
  11. DEBUG=false GORM_DIALECT=${dialect} go test -race ./...
  12. cd ../..
  13. DEBUG=false GORM_DIALECT=${dialect} go test -race ./...
  14. else
  15. cd dialects/${dialect}
  16. DEBUG=false GORM_DIALECT=${dialect} go test -race ./...
  17. cd ../..
  18. DEBUG=false GORM_DIALECT=${dialect} go test -race -v ./...
  19. fi
  20. fi
  21. done