Skip to content
Snippets Groups Projects
Verified Commit c8d7012b authored by Timm Fitschen's avatar Timm Fitschen
Browse files

WIP: pipeline

parent a38cbe56
Branches
Tags
No related merge requests found
......@@ -67,7 +67,7 @@ function _execute_tests () {
# options: [--fresh]
function _install_unit_test_database () {
DATABASE_NAME=$UNITTEST_DATABASE
if _db_exists "$SQL" "$DATABASE_NAME"; then
if _db_exists "$DATABASE_NAME"; then
if [[ "$1" == "--fresh" ]] ; then
drop "$DATABASE_NAME" ;
else
......@@ -91,7 +91,7 @@ function _install_unit_test_database () {
# install test framework MyTAP if not installed
function _setup_mytap() {
if _db_exists "$SQL" "tap" ; then
if _db_exists "tap" ; then
echo MyTAB framework is already installed [OK]
return 0
fi
......@@ -201,9 +201,9 @@ function drop() {
# Returns 0 or non-zero, depending on whether the database exists already.
# Optional parameters: [SQL [DATABASE_NAME]]
# Optional parameter: [DATABASE_NAME]
function _db_exists() {
${1-${SQL}} -D "${2-${DATABASE_NAME}}" -e "show tables;" > /dev/null 2>&1 \
$SQL -D "${1-${DATABASE_NAME}}" -e "show tables;" > /dev/null 2>&1 \
&& return 0 || return 1
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment