Mercurial > hg
changeset 46604:ad107ed7a4aa
ci: test real dependency installation for pip
In the past, the pip smoke test inhibited actual dependency
installation, but that fails in different environments for setuptools
itself. Since it isn't what we actually want to test (which is pip
install), allow this to call home, if HGTESTS_ALLOW_NETIO=1 is set
in the environment.
Differential Revision: https://phab.mercurial-scm.org/D9950
author | Joerg Sonnenberger <joerg@bec.de> |
---|---|
date | Thu, 04 Feb 2021 23:23:35 +0100 |
parents | 1b7c0b10d930 |
children | 946a07f08906 |
files | tests/hghave.py tests/test-install.t |
diffstat | 2 files changed, 13 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/hghave.py Wed Feb 17 20:40:19 2021 +0100 +++ b/tests/hghave.py Thu Feb 04 23:23:35 2021 +0100 @@ -702,6 +702,12 @@ return os.path.isdir(os.path.join(t, "..", ".hg")) +@check("network-io", "whether tests are allowed to access 3rd party services") +def has_test_repo(): + t = os.environ.get("HGTESTS_ALLOW_NETIO") + return t == "1" + + @check("curses", "terminfo compiler and curses module") def has_curses(): try:
--- a/tests/test-install.t Wed Feb 17 20:40:19 2021 +0100 +++ b/tests/test-install.t Thu Feb 04 23:23:35 2021 +0100 @@ -184,7 +184,7 @@ $ cd $TESTTMP $ unset PYTHONPATH -#if py3 ensurepip +#if py3 ensurepip network-io $ "$PYTHON" -m venv installenv >> pip.log Hack: Debian does something a bit different in ensurepip.bootstrap. This makes @@ -197,8 +197,10 @@ Note: we use this weird path to run pip and hg to avoid platform differences, since it's bin on most platforms but Scripts on Windows. - $ ./installenv/*/pip install --no-index $TESTDIR/.. >> pip.log + $ ./installenv/*/pip install $TESTDIR/.. >> pip.log Failed building wheel for mercurial (?) + WARNING: You are using pip version *; however, version * is available. (glob) (?) + You should consider upgrading via the '$TESTTMP/installenv/bin/python* -m pip install --upgrade pip' command. (glob) (?) $ ./installenv/*/hg debuginstall || cat pip.log checking encoding (ascii)... checking Python executable (*) (glob) @@ -222,17 +224,17 @@ no problems detected #endif -#if virtualenv no-py3 +#if virtualenv no-py3 network-io Note: --no-site-packages is the default for all versions enabled by hghave - $ "$PYTHON" -m virtualenv --never-download installenv >> pip.log + $ "$PYTHON" -m virtualenv installenv >> pip.log DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. (?) DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support (?) Note: we use this weird path to run pip and hg to avoid platform differences, since it's bin on most platforms but Scripts on Windows. - $ ./installenv/*/pip install --no-index $TESTDIR/.. >> pip.log + $ ./installenv/*/pip install $TESTDIR/.. >> pip.log DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. (?) DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support (?) DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality. (?)