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:
parent
4f083830f2
commit
1ae9a15f6e
1 changed files with 7 additions and 3 deletions
|
@ -50,10 +50,14 @@ EOF
|
||||||
if [ "x$run_name" = "x" ]; then
|
if [ "x$run_name" = "x" ]; then
|
||||||
run_name='*.sql'
|
run_name='*.sql'
|
||||||
else
|
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
|
fi
|
||||||
pg_prove -d $test_db `find admin/ -type f -name "$run_name" | sort` || exit 1
|
|
||||||
pg_prove -U $test_user -d $test_db `find user/ -type f -name "$run_name" | sort` || exit 1
|
|
||||||
)
|
)
|
||||||
result=$?
|
result=$?
|
||||||
|
|
||||||
|
|
Reference in a new issue