svn commit: r1922117 - /subversion/trunk/CMakeLists.txt

[email protected]
Newsgroups gmane.comp.version-control.subversion.svn
Message-ID <[email protected]>
Author: rinrab
Date: Tue Nov 26 13:23:03 2024
New Revision: 1922117

URL: http://svn.apache.org/viewvc?rev=1922117&view=rev
Log:
cmake: follow-up to r1922116: use the test's relative path only when adding
it to the list of the running tests. Use absolute path when listing the tests
with EXPAND_TESTS option enabled.

* CMakeLists.txt
  (foreach PYTHON_TESTS): Separate py_test_abspath and py_test_relpath
   variables.

Modified:
    subversion/trunk/CMakeLists.txt

Modified: subversion/trunk/CMakeLists.txt
URL: http://svn.apache.org/viewvc/subversion/trunk/CMakeLists.txt?rev=1922117&r1=1922116&r2=1922117&view=diff
==============================================================================
--- subversion/trunk/CMakeLists.txt (original)
+++ subversion/trunk/CMakeLists.txt Tue Nov 26 13:23:03 2024
@@ -797,10 +797,10 @@ if(SVN_ENABLE_TESTS)
      "subversion/tests/cmdline/*_tests.py"
   )
 
-  foreach(py_test_path ${PYTHON_TESTS})
+  foreach(py_test_abspath ${PYTHON_TESTS})
     # Keep `.py'.
-    get_filename_component(py_test_name ${py_test_path} NAME_WLE)
-    file(RELATIVE_PATH py_test_path ${CMAKE_CURRENT_SOURCE_DIR} ${py_test_path})
+    get_filename_component(py_test_name ${py_test_abspath} NAME_WLE)
+    file(RELATIVE_PATH py_test_relpath ${CMAKE_CURRENT_SOURCE_DIR} ${py_test_path})
     set(binary_dir $<TARGET_FILE_DIR:svn>)
 
     if(EXPAND_TESTS)
@@ -822,13 +822,13 @@ if(SVN_ENABLE_TESTS)
 
         add_py_test(
           "cmdline.${py_test_name}.${test_num}"
-          "${py_test_path}#${test_num}"
+          "${py_test_relpath}#${test_num}"
         )
       endforeach()
     else()
       add_py_test(
         "cmdline.${py_test_name}"
-        "${py_test_path}"
+        "${py_test_relpath}"
       )
     endif()
   endforeach()
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.