2016-02-27 16:40:24 +01:00
|
|
|
#!/bin/bash
|
2016-02-27 15:48:20 +01:00
|
|
|
|
2017-02-08 11:21:04 +01:00
|
|
|
# Has to be executed from the root of the repository.
|
|
|
|
# Usually invoked by `make test`.
|
2016-02-27 15:48:20 +01:00
|
|
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./
|
|
|
|
|
2017-02-08 11:21:04 +01:00
|
|
|
RET=0
|
|
|
|
|
|
|
|
# Running the tests.
|
2016-02-27 15:48:20 +01:00
|
|
|
bin/sql_grammar_test -f "test/lib/valid_queries.sql"
|
2017-02-08 11:21:04 +01:00
|
|
|
RET=$(($RET + $?))
|
2016-02-27 15:48:20 +01:00
|
|
|
|
|
|
|
bin/sql_tests
|
2017-02-08 11:21:04 +01:00
|
|
|
RET=$(($RET + $?))
|
|
|
|
|
|
|
|
# Running memory leak checks.
|
|
|
|
echo ""
|
|
|
|
echo "Running memory leak checks..."
|
|
|
|
|
|
|
|
valgrind --leak-check=full --error-exitcode=1 \
|
|
|
|
./bin/sql_grammar_test -f "test/lib/valid_queries.sql" >> /dev/null
|
|
|
|
RET=$(($RET + $?))
|
2016-02-27 15:48:20 +01:00
|
|
|
|
2017-02-08 11:21:04 +01:00
|
|
|
valgrind --leak-check=full --error-exitcode=1 \
|
|
|
|
./bin/sql_tests -f "test/lib/valid_queries.sql" >> /dev/null
|
|
|
|
RET=$(($RET + $?))
|
2016-02-27 15:48:20 +01:00
|
|
|
|
2017-02-08 11:21:04 +01:00
|
|
|
exit $RET
|