Author: rinrab
Date: Wed Sep 11 18:32:11 2024
New Revision: 1920574
URL: http://svn.apache.org/viewvc?rev=1920574&view=rev
Log:
On the 'cmake' branch: Group tests by type.
Visual Studio will group the tests by components, separated with
dot symbol (.).
* build/generator/gen_cmake.py
(write): initialize namespace field of the targets with the path's basename.
* build/generator/templates/targets.cmake.ezt
(tests): Change test name to NAMESPACE.TESTNAME (for example
libsvn_ra.ra-test).
* CMakeLists.txt
(pytests): Prefix test names with `cmdline.'
Modified:
subversion/branches/cmake/CMakeLists.txt
subversion/branches/cmake/build/generator/gen_cmake.py
subversion/branches/cmake/build/generator/templates/targets.cmake.ezt
Modified: subversion/branches/cmake/CMakeLists.txt
URL:
http://svn.apache.org/viewvc/subversion/branches/cmake/CMakeLists.txt?rev=1920574&r1=1920573&r2=1920574&view=diff
==============================================================================
--- subversion/branches/cmake/CMakeLists.txt (original)
+++ subversion/branches/cmake/CMakeLists.txt Wed Sep 11 18:32:11 2024
@@ -662,11 +662,11 @@ if(SVN_ENABLE_TESTS)
foreach(py_test_path ${PYTHON_TESTS})
# Keep `.py'.
- get_filename_component(py_test_name ${py_test_path} NAME)
+ get_filename_component(py_test_name ${py_test_path} NAME_WLE)
add_test(
NAME
- ${py_test_name}
+ "cmdline.${py_test_name}"
COMMAND
"${Python3_EXECUTABLE}"
"${CMAKE_CURRENT_SOURCE_DIR}/build/run_tests.py"
--bin ${CMAKE_CURRENT_BINARY_DIR}
Modified: subversion/branches/cmake/build/generator/gen_cmake.py
URL:
http://svn.apache.org/viewvc/subversion/branches/cmake/build/generator/gen_cmake.py?rev=1920574&r1=1920573&r2=1920574&view=diff
==============================================================================
--- subversion/branches/cmake/build/generator/gen_cmake.py (original)
+++ subversion/branches/cmake/build/generator/gen_cmake.py Wed Sep 11 18:32:11
2024
@@ -222,6 +222,7 @@ class Generator(gen_base.GeneratorBase):
install_target = ezt.boolean(install_target),
swig_lang = swig_lang,
is_apache_mod = is_apache_mod,
+ namespace = os.path.basename(target.path),
)
targets.append(new_target)
Modified: subversion/branches/cmake/build/generator/templates/targets.cmake.ezt
URL:
http://svn.apache.org/viewvc/subversion/branches/cmake/build/generator/templates/targets.cmake.ezt?rev=1920574&r1=1920573&r2=1920574&view=diff
==============================================================================
--- subversion/branches/cmake/build/generator/templates/targets.cmake.ezt
(original)
+++ subversion/branches/cmake/build/generator/templates/targets.cmake.ezt Wed
Sep 11 18:32:11 2024
@@ -62,7 +62,7 @@ if ([targets.enable_condition])[is targe
add_executable([targets.name][for targets.sources]
[targets.sources][end]
)
- add_test([targets.name] [targets.name] --srcdir
${CMAKE_SOURCE_DIR}/[targets.srcdir])
+ add_test([targets.namespace].[targets.name] [targets.name] --srcdir
${CMAKE_SOURCE_DIR}/[targets.srcdir])
[end]target_link_libraries([targets.name] PRIVATE[for targets.libs]
[targets.libs][end]
)[if-any targets.msvc_libs]