Commit 10b6dba2 authored by Jason Moiron's avatar Jason Moiron

exit test-all on any error so false-positive build failures dont sneak through drone

parent 57713631
#!/bin/sh
#!/bin/bash
#
# To use this script, set the following environment variables:
#
......@@ -20,6 +20,12 @@ if [ -f "./environ" ]; then
. ./environ
fi
function exit_on_error {
if [ $1 != 0 ]; then
exit $1
fi
}
# set -e
if [ -n "$MODL_MYSQL_DSN" ]; then
......@@ -27,6 +33,7 @@ if [ -n "$MODL_MYSQL_DSN" ]; then
export MODL_TEST_DIALECT="mysql"
echo "Testing MySQL"
go test $@
exit_on_error $?
else
echo "Skipping MySQL, \$MODL_MYSQL_DSN=$MODL_MYSQL_DSN"
if [ -n "$MODL_FAIL_ON_SKIP" ]; then
......@@ -39,6 +46,7 @@ if [ -n "$MODL_POSTGRES_DSN" ]; then
export MODL_TEST_DIALECT="postgres"
echo "Testing PostgreSQL"
go test $@
exit_on_error $?
else
echo "Skipping PostgreSQL, \$MODL_POSTGRES_DSN=$MODL_POSTGRES_DSN"
if [ -n "$MODL_FAIL_ON_SKIP" ]; then
......@@ -51,6 +59,7 @@ if [ -n "$MODL_SQLITE_DSN" ]; then
export MODL_TEST_DIALECT="sqlite"
echo "Testing SQLite"
go test $@
exit_on_error $?
else
echo "Skipping SQLite, \$MODL_SQLITE_DSN=$MODL_SQLITE_DSN"
if [ -n "$MODL_FAIL_ON_SKIP" ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment