Improvements to developer SQL tests runner

* The script will no longer fail when there are no tests matching the
requested name in either admin/ or user/

* The script will ignore non-SQL files when running with --run-name
This commit is contained in:
Emmanuel BENOîT 2012-02-16 18:32:44 +01:00
parent 4f083830f2
commit 1ae9a15f6e

View file

@ -50,10 +50,14 @@ EOF
if [ "x$run_name" = "x" ]; then
run_name='*.sql'
else
run_name='*'"$run_name"'*'
run_name='*'"$run_name"'*.sql'
fi
if ! [ -z "`find admin/ -type f -name "$run_name"`" ]; then
pg_prove -d $test_db `find admin/ -type f -name "$run_name" | sort` || exit 1
fi
if ! [ -z "`find user/ -type f -name "$run_name"`" ]; then
pg_prove -U $test_user -d $test_db `find user/ -type f -name "$run_name" | sort` || exit 1
fi
)
result=$?