to set at least 4 variables in your ~/.bashrc (recommended):
export FRIENDICA_MYSQL_HOST="localhost"
export FRIENDICA_MYSQL_DATABASE="friendica_test"
export FRIENDICA_MYSQL_USER="friendica_test"
export FRIENDICA_MYSQL_PASSWWORD="friendica_test"
Then you can put ./bin/dev/run_tests.sh into your .git/hooks/pre-commit file