Files
git-hooks/testsuite/run-testsuite
Thomas Quinot d5b93a65bd Do not let user's .gitconfig affect testsuite output
The testsuite depends on git running with default configuration.
Customizations in the user's global configuration ($HOME/.gitconfig)
should be ignored.

Change-Id: Iff4b3ba49294fd78bb1d5a78a908a9308ae0b5d8
2020-06-15 11:32:45 -07:00

36 lines
883 B
Bash
Executable File

#!/usr/bin/env bash
# This is a wrapper to testsuite.py; it sets the environment before launching
# it.
root=`dirname $0`
# If "root" is a relative path, then convert it to absolute.
if [ "`echo ${root} | cut -b1`" != '/' ]; then
root="`pwd`/${root}"
fi
if [ "$OS" = "Windows_NT" ]; then
PYTHONPATH="${root}/lib;$PYTHONPATH"
else
PYTHONPATH=${root}/lib:$PYTHONPATH
fi
export PYTHONPATH
export LANG=C
# Make sure user's global .gitconfig does not affect test output.
#
# This means that the user.name and user.email configuration aren't
# set, triggering warnings when using git. So export this information
# via environment variables instead.
unset HOME
export GIT_AUTHOR_NAME='Manu Script'
export GIT_AUTHOR_EMAIL='script@example.com'
export GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"
export GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"
python ${root}/lib/testsuite.py "$@"