7
# Default parameters for pgScript if nothing is provided (see Usage).
8
DEFAULTPARAM="-h 127.0.0.1 -U postgres -d testbase"
14
echo "Runs integration tests"
15
echo "Usage: $0 [parameters for db connection]"
21
echo -n "cd $THISDIR... "
26
# Get parameters for database connections
29
PARAMETERS="$DEFAULTPARAM" # Default if nothing is provided
33
echo -e "- Using '$PARAMETERS' \n for database connection"
35
# Try to find pgScript
36
PGS1="./../../src/pgScript"
37
PGS2="./../../bin/pgScript"
46
echo "- pgScript executable not found: please configure script"
50
echo "- pgScript at '$PGS' found"
51
echo "- Check output below: no [EXCEPTION] should appear."
54
# Execute pgScript programs
55
echo "############# RUNNING TESTS #############"
57
for src in `ls ./source/*.sql.pgs`; do
58
output=$($PGS $PARAMETERS -e cp1252 "$src" 2>&1 >/dev/null)
59
echo "$output" | awk '{
64
else if ($1 != "[QUERY" && query == 0)
70
echo "################## DONE ##################"
73
echo -n "cd $PREVDIR... "