Author: brane
Date: Mon Jun  1 20:51:03 2026
New Revision: 1934860

Log:
In the CMake build, do not create the Python virtual environment with
dependencies for validating XML output in tests.

* CMakeLists.txt
  [SVN_ENABLE_TESTS]: Skip creating and populating the virtual environment.
   Use the global Python interpreter to run tests.

* build/run_tests.py
  (create_parser): Remove option --create-python-venv.
  (main): Remove all code that was used to implement that option.

Modified:
   subversion/trunk/CMakeLists.txt
   subversion/trunk/build/run_tests.py

Modified: subversion/trunk/CMakeLists.txt
==============================================================================
--- subversion/trunk/CMakeLists.txt     Mon Jun  1 20:10:04 2026        
(r1934859)
+++ subversion/trunk/CMakeLists.txt     Mon Jun  1 20:51:03 2026        
(r1934860)
@@ -919,21 +919,6 @@ if(SVN_ENABLE_TESTS)
   set(list_tests_script "${CMAKE_CURRENT_SOURCE_DIR}/build/list_tests.py")
   set(test_base_dir "${CMAKE_CURRENT_BINARY_DIR}/Testing")
 
-  # Create the virtual environment for Python tests.
-  execute_process(
-    COMMAND
-      "${Python3_EXECUTABLE}" "${run_tests_script}"
-      --create-python-venv "${test_base_dir}"
-      ${CMAKE_CURRENT_SOURCE_DIR}
-      OUTPUT_VARIABLE command_output
-      WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
-      RESULT_VARIABLE command_result
-  )
-  if (command_result)
-    message(SEND_ERROR "run_tests.py --create-python-venv failed.")
-  endif()
-  string(STRIP "${command_output}" python3_test_executable)
-
   function(add_py_test name prog)
     if(SVN_TEST_CONFIGURE_FOR_PARALLEL)
       set(test_root "${test_base_dir}/${name}")
@@ -947,7 +932,7 @@ if(SVN_ENABLE_TESTS)
       NAME
         "${name}"
       COMMAND
-        "${python3_test_executable}" "${run_tests_script}"
+        "${Python3_EXECUTABLE}" "${run_tests_script}"
         --bin ${binary_dir}
         --tools-bin ${binary_dir}
         --verbose

Modified: subversion/trunk/build/run_tests.py
==============================================================================
--- subversion/trunk/build/run_tests.py Mon Jun  1 20:10:04 2026        
(r1934859)
+++ subversion/trunk/build/run_tests.py Mon Jun  1 20:51:03 2026        
(r1934860)
@@ -1041,10 +1041,6 @@ def create_parser():
                     help='Use the svn binaries installed in this path')
   parser.add_option('--tools-bin', action='store', dest='tools_bin',
                     help='Use the svn tools installed in this path')
-  parser.add_option('--create-python-venv', action='store', dest='create_venv',
-                    help=('Create the Python virtual environment inside this'
-                          ' path and install the dependencies used by the'
-                          ' test suite, then exit. Do not run any tests.'))
   parser.add_option('--python-venv', action='store', dest='venv_base',
                     help=('Use the virtual environment inside this path to'
                           ' find the dependencies used by the test suite.'))
@@ -1113,13 +1109,6 @@ def create_parser():
 
 def main():
   (opts, args) = create_parser().parse_args(sys.argv[1:])
-  if opts.create_venv:
-    main_create_venv(opts, args)
-    sys.exit(0)
-
-  # Normal mode: don't create a virtual environment, run tests or whatever
-  # else was requested instead. Create the virtual environment on demand.
-  assert not opts.create_venv
 
   if len(args) < 3:
     print("{}: at least three positional arguments required; got {!r}".format(
@@ -1142,25 +1131,6 @@ def main():
   if failed:
     sys.exit(1)
 
-def main_create_venv(opts, args):
-  # Environment creation mode: create the requested virtual environment,
-  # install required dependencies and exit.
-  assert opts.create_venv
-
-  if len(args) < 1:
-    print("{}: at least one positional argument required; got {!r}".format(
-      os.path.basename(sys.argv[0]), args
-    ))
-    sys.exit(2)
-  abs_srcdir = args[0]
-
-  sys.path.insert(0, os.path.join(abs_srcdir, "subversion", "tests", 
"cmdline"))
-  svntest = importlib.import_module("svntest")
-  svntest.main.venv_base = opts.create_venv
-  venv_dir = svntest.main.venv_path()
-  python_prog, _ = svntest.main.create_python_venv(venv_dir, quiet=True)
-  print(python_prog)
-
 
 # Run main if not imported as a module
 if __name__ == '__main__':

Reply via email to