Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pimped testsuite for PostgreSQL #428

Merged
merged 18 commits into from
Aug 14, 2013
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Renamed function declaration to posix-syntax as it seems travis doesn…
…t have full bash.
  • Loading branch information
marcj committed Aug 14, 2013
commit ecd5340987490775b772a81f8dbcd6c2d47b801c
9 changes: 2 additions & 7 deletions tests/bin/setup.base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,8 @@ if [ "$DB" = "" ]; then
exit;
fi

if [ "$DB_USER" = "" ]; then
echo "\$DB_USER is not defined."
exit;
fi

function check {
check() {
if [ $? != 0 ]; then
echo "Aborted."; exit;
echo "Aborted."; exit 1;
fi
}
6 changes: 5 additions & 1 deletion tests/bin/setup.mysql.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ fi

if [ "$mysql" = "" ]; then
echo "Can not find mysql binary. Is it installed?";
exit;
exit 1;
fi

if [ "$DB_USER" = "" ]; then
DB_USER="root";
fi

$mysql -u$DB_USER -e '\
Expand Down
4 changes: 4 additions & 0 deletions tests/bin/setup.postgres.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
DIR=`dirname $0`;
. $DIR/setup.base.sh;

if [ "$DB_USER" = "" ]; then
DB_USER="postgres";
fi

dropdb -U $DB_USER postgres;
check;

Expand Down