On 1. 6. 2026 22:30, Branko Čibej wrote:
On 1. 6. 2026 22:25, Branko Čibej wrote:
On 1. 6. 2026 17:41, Ivan Zhakov wrote:
On Fri, 22 May 2026 at 13:50, Branko Čibej <[email protected]> wrote:
On 22. 5. 26 12:27, Branko Čibej wrote:
On 22. 5. 26 11:50, [email protected] wrote:
Author: brane
Date: Fri May 22 09:50:14 2026
New Revision: 1934497
Log:
Allow the tests to work with a non-standart Python 3 installation that
does not provide the 'venv' module.
This commit addresses some of Ivan's concerns.
1. The 'venv' module isn't available
'venv' is part of the Python standard library, so strictly
speaking, it should always be available to the tests. But it's
no big deal to make it conditional. If it's not present, the
test driver won't attempt to create a virtual environment or
download any dependencies.
I tested this with CMake, but the graceful degradation doesn't seem
to be working. In my case, configuration fails with an AssertionError:
[[[
cmake -B out\1 -S .
"-DCMAKE_TOOLCHAIN_FILE=..\vcpkg\scripts\buildsystems\vcpkg.cmake"
"-DSVN_ENABLE_RA_SERF=OFF" "-DSVN_ENABLE_TESTS=ON"
"-DPython3_ROOT_DIR=..\python" "-DPython3_FIND_REGISTRY=NEVER"
-- Selecting Windows SDK version 10.0.26100.0 to target Windows
10.0.26200.
Traceback (most recent call last):
File "C:\Ivan\OpenSource\svn-trunk\build\run_tests.py", line 1167,
in <module>
main()
File "C:\Ivan\OpenSource\svn-trunk\build\run_tests.py", line 1117,
in main
main_create_venv(opts, args)
File "C:\Ivan\OpenSource\svn-trunk\build\run_tests.py", line 1161,
in main_create_venv
python_prog, _ = svntest.main.create_python_venv(venv_dir,
quiet=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"C:\Ivan/OpenSource/svn-trunk\subversion\tests\cmdline\svntest\main.py",
line 2500, in create_python_venv
assert venv is not None
^^^^^^^^^^^^^^^^
AssertionError
CMake Error at CMakeLists.txt:892 (message):
run_tests.py --create-python-venv failed.
<...>
How come we're not seeing that in CI?
It seems that only CMakeLists.txt runs
run_tests.py --create-python-venv
I missed that, I'll remove it from CMakeLists.txt and from the
run_tests.py options. It shouldn't be there.
Forgot to add – I can't reliably test the CMake build, so if I break
something ... please be gentle.
r1934860, seems to work in CI. However, XML validation doesn't happen
now, even though the test runners have the proper dependencies
installed. Probably because of how CMake runs tests completely
differently than autotools. I ask whoever maintains that to please put a
bit of effort in so that we get proper XML validation with CMake, too.
I'm not going to do that, I've had enough headaches with the CMake build
as it is.
I'll point out once more that running tests without a full Python 3
installation is not officially supported. Python 3 without the 'venv'
module is not Python 3. You really should update INSTALL about that.
-- Brane