mirror of
https://github.com/AdaCore/git-hooks.git
synced 2026-02-12 12:43:11 -08:00
The testsuite depends on git running with default configuration. Customizations in the user's global configuration ($HOME/.gitconfig) should be ignored. Change-Id: Iff4b3ba49294fd78bb1d5a78a908a9308ae0b5d8
36 lines
883 B
Bash
Executable File
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 "$@"
|
|
|