diff --git a/runtests.sh b/runtests.sh index d3da693..6f4fe6b 100755 --- a/runtests.sh +++ b/runtests.sh @@ -12,6 +12,9 @@ export SKIP_QA_HARNESS=$? LIB_FUNCTIONS='./tests/0_lib/functions.sh' +# Just in case $LIB_FUNCTIONS doesn't exist +export FAIL=1 + [ -f $LIB_FUNCTIONS ] && source $LIB_FUNCTIONS || { echo -e "\n[+] `date` -> Unable to source functions library. Cannot continue\n"; exit $FAIL; } # case insensitive filename matching diff --git a/tests/0_lib/functions.sh b/tests/0_lib/functions.sh index b112151..2a1beb4 100755 --- a/tests/0_lib/functions.sh +++ b/tests/0_lib/functions.sh @@ -53,7 +53,7 @@ function t_Process while read -u 7 f do # skip files named readme or those that start with an _ - [[ "${f}" =~ readme|^_ ]] && continue; + [[ "$(basename ${f})" =~ readme|^_ ]] && continue; # handy tip: chmod -x to disable individual test scripts. [ -x ${f} ] && ${f} diff --git a/tests/p_sqlite/sqlite_1-create_db_table.sh b/tests/p_sqlite/sqlite_1-create_db_table.sh index 85e2b71..2dbd733 100755 --- a/tests/p_sqlite/sqlite_1-create_db_table.sh +++ b/tests/p_sqlite/sqlite_1-create_db_table.sh @@ -3,6 +3,7 @@ t_Log "Running $0 - check that sqlite can create database and tables." +sqlite3 /tmp/tf_test.db 'drop table if exists tf_table;' sqlite3 /tmp/tf_test.db 'create table tf_table(text, id INTEGER);' t_CheckExitStatus $?