diff --git a/legacyworlds/dev-tools/run-database-tests.sh b/legacyworlds/dev-tools/run-database-tests.sh index cfaf812..b1956f8 100755 --- a/legacyworlds/dev-tools/run-database-tests.sh +++ b/legacyworlds/dev-tools/run-database-tests.sh @@ -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 - 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=$?