tests/testlib/pythonpath.sh
author Joerg Sonnenberger <joerg@bec.de>
Thu, 09 Apr 2020 14:49:31 +0200
changeset 5316 277b45cf0dda
parent 4336 33fc61e5e119
permissions -rw-r--r--
tests: silence potential warnings about uname -o The option is not supported on the BSDs, but also not relevant as it is only used to detect msys.

# utility to setup pythonpath to point into the tested repository

export SRCDIR="`dirname $TESTDIR`"
if [ -n "$PYTHONPATH" ]; then
    export HGTEST_ORIG_PYTHONPATH=$PYTHONPATH
    if uname -o 2> /dev/null | grep -q Msys; then
        export PYTHONPATH="$SRCDIR;$PYTHONPATH"
    else
        export PYTHONPATH=$SRCDIR:$PYTHONPATH
    fi
else
    export PYTHONPATH=$SRCDIR
fi