Mercurial > public > mercurial-scm > hg-stable
diff tests/test-run-tests.t @ 47505:23f5ed6dbcb1
run-tests: stop writing a `python3` symlink pointing to python2
Having `python3` actually pointing to `python2` is bad. So we stop doing so.
In addition we need to re-introduce a `python` executable since some of the
script really need to be able to say "current python" in their shbang. For
example, `hghave` is one of such script.
The faulty changes where introduced by c102b704edb5.
Differential Revision: https://phab.mercurial-scm.org/D10943
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 02 Jul 2021 23:09:44 +0200 |
parents | dff19fe2973c |
children | 57bdecf4322c |
line wrap: on
line diff
--- a/tests/test-run-tests.t Tue Jul 06 12:42:32 2021 +0200 +++ b/tests/test-run-tests.t Fri Jul 02 23:09:44 2021 +0200 @@ -2036,3 +2036,34 @@ # Ran 2 tests, 0 skipped, 2 failed. python hash seed: * (glob) [1] + +Test that a proper "python" has been set up +=========================================== + +(with a small check-code work around) + $ printf "#!/usr/bi" > test-py3.tmp + $ printf "n/en" >> test-py3.tmp + $ cat << EOF >> test-py3.tmp + > v python3 + > import sys + > print('.'.join(str(x) for x in sys.version_info)) + > EOF + $ mv test-py3.tmp test-py3.py + $ chmod +x test-py3.py + +(with a small check-code work around) + $ printf "#!/usr/bi" > test-py.tmp + $ printf "n/en" >> test-py.tmp + $ cat << EOF >> test-py.tmp + > v python + > import sys + > print('.'.join(str(x) for x in sys.version_info)) + > EOF + $ mv test-py.tmp test-py.py + $ chmod +x test-py.py + + $ ./test-py3.py + 3.* (glob) + $ ./test-py.py + 2.* (glob) (no-py3 !) + 3.* (glob) (py3 !)