# HG changeset patch # User Matt Harbison # Date 1546645606 18000 # Node ID 9980df8eda987f890350e87eacbc61d207b5897d # Parent 2d3ee6a25d2c570bf2c35a67151d6b6be3dec999 tests: fix PYTHONPATH manipulation on Windows Without the semicolon separator and quotes, the variables ends up like this: c:\Users\Matt\projects\hg-evolve:c:\Users\Matt\projects\hg-evolve: c:\Users\Matt\projects\hg;c:\Users\Matt\projects\hg-evolve\tests; c:\Users\Matt\projects\hg\tests That in turn makes the local evolve code unreachable, and the system installed code is tested instead. I'm testing against `uname` instead of a trivial python script printing os.name because maybe one day tests will run on WSL. diff -r 2d3ee6a25d2c -r 9980df8eda98 tests/testlib/pythonpath.sh --- a/tests/testlib/pythonpath.sh Mon Dec 24 18:36:25 2018 +0100 +++ b/tests/testlib/pythonpath.sh Fri Jan 04 18:46:46 2019 -0500 @@ -1,9 +1,14 @@ # utility to setup pythonpath to point into the tested repository -export SRCDIR=`dirname $TESTDIR` +export SRCDIR="`dirname $TESTDIR`" if [ -n "$PYTHONPATH" ]; then export HGTEST_ORIG_PYTHONPATH=$PYTHONPATH - export PYTHONPATH=$SRCDIR:$PYTHONPATH + osname="`uname -o`" + if (uname -o | grep -q Msys); then + export PYTHONPATH="$SRCDIR;$PYTHONPATH" + else + export PYTHONPATH=$SRCDIR:$PYTHONPATH + fi else export PYTHONPATH=$SRCDIR fi