From 187bacc25402c1673437c2b0ea83459c512dc263 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Thu, 10 Mar 2022 15:49:46 +0100 Subject: [PATCH] tests: don't wipe python environment * tests/run.in: keep original PYTHONPATH contents * NEWS: mention the bug --- NEWS | 3 +++ tests/run.in | 9 ++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 89a1d52a2..345ec7fdd 100644 --- a/NEWS +++ b/NEWS @@ -77,6 +77,9 @@ New in spot 2.10.4.dev (net yet released) - Do not use the seq command in test cases, it is not available everywhere. + - Do not erase the previous contents of the PYTHONPATH environment + variable when running tests, prepend to it instead. + New in spot 2.10.4 (2022-02-01) Bug fixed: diff --git a/tests/run.in b/tests/run.in index d14bf52a9..7eaa7732c 100755 --- a/tests/run.in +++ b/tests/run.in @@ -104,18 +104,21 @@ export srcdir case $1 in *.ipynb) - PYTHONPATH=$pypath DYLD_LIBRARY_PATH=$modpath:$DYLD_LIBRARY_PATH \ + PYTHONPATH=$pypath:$PYTHONPATH \ + DYLD_LIBRARY_PATH=$modpath:$DYLD_LIBRARY_PATH \ PYTHONIOENCODING=utf-8:surrogateescape \ exec $PREFIXCMD @PYTHON@ @abs_srcdir@/python/ipnbdoctest.py "$@";; *.py) - PYTHONPATH=$pypath DYLD_LIBRARY_PATH=$modpath:$DYLD_LIBRARY_PATH \ + PYTHONPATH=$pypath:$PYTHONPATH \ + DYLD_LIBRARY_PATH=$modpath:$DYLD_LIBRARY_PATH \ exec $PREFIXCMD @PYTHON@ "$@";; *.test) exec sh -x "$@";; *.pl) exec $PERL "$@";; *python*|*jupyter*|*pypy*) - PYTHONPATH=$pypath DYLD_LIBRARY_PATH=$modpath:$DYLD_LIBRARY_PATH \ + PYTHONPATH=$pypath:$PYTHONPATH \ + DYLD_LIBRARY_PATH=$modpath:$DYLD_LIBRARY_PATH \ exec $PREFIXCMD "$@";; *) echo "Unknown extension" >&2