On 2024/09/18 21:12, [email protected] wrote:
> Author: rinrab
> Date: Wed Sep 18 12:12:52 2024
> New Revision: 1920768
>
> URL: http://svn.apache.org/viewvc?rev=1920768&view=rev
> Log:
> cmake: Exclude svneditor.py from tests, since it is just an internal script
> for the test-suite and cannot be run as a test.
>
> * CMakeLists.txt
> (pytests): Filter 'svneditor' test name.
>
> Modified:
> subversion/trunk/CMakeLists.txt
In build.conf, it is configured to collect "subversion/tests/cmdline/*_tests.py"
for test scripts, not "subversion/tests/cmdline/*.py".
I think we could use ".../*_tests.py" rather than filtering "svneditor.py".
[[[
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt (revision 1920837)
+++ CMakeLists.txt (working copy)
@@ -662,7 +662,7 @@ if(SVN_ENABLE_TESTS)
find_package(Python3 COMPONENTS Interpreter REQUIRED)
file(GLOB PYTHON_TESTS
- "subversion/tests/cmdline/*.py"
+ "subversion/tests/cmdline/*_tests.py"
)
foreach(py_test_path ${PYTHON_TESTS})
@@ -669,22 +669,20 @@ if(SVN_ENABLE_TESTS)
# Keep `.py'.
get_filename_component(py_test_name ${py_test_path} NAME_WLE)
- if(NOT ${py_test_name} STREQUAL "svneditor")
- add_test(
- NAME
- "cmdline.${py_test_name}"
- COMMAND
- "${Python3_EXECUTABLE}"
"${CMAKE_CURRENT_SOURCE_DIR}/build/run_tests.py"
- --bin ${CMAKE_CURRENT_BINARY_DIR}
- --tools-bin ${CMAKE_CURRENT_BINARY_DIR}
- --verbose
- --log-to-stdout
- --set-log-level=WARNING
- ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_BINARY_DIR}
- ${py_test_path}
- )
- endif()
+ add_test(
+ NAME
+ "cmdline.${py_test_name}"
+ COMMAND
+ "${Python3_EXECUTABLE}"
"${CMAKE_CURRENT_SOURCE_DIR}/build/run_tests.py"
+ --bin ${CMAKE_CURRENT_BINARY_DIR}
+ --tools-bin ${CMAKE_CURRENT_BINARY_DIR}
+ --verbose
+ --log-to-stdout
+ --set-log-level=WARNING
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${py_test_path}
+ )
endforeach()
endif()
]]]
--
Jun Omae <[email protected]> (大前 潤)