pytest-cmake 0.11.0__tar.gz → 0.11.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pytest_cmake-0.11.0 → pytest_cmake-0.11.2}/PKG-INFO +2 -2
- {pytest_cmake-0.11.0 → pytest_cmake-0.11.2}/cmake/FindPytest.cmake +6 -4
- {pytest_cmake-0.11.0 → pytest_cmake-0.11.2}/cmake/PytestAddTests.cmake +4 -4
- {pytest_cmake-0.11.0 → pytest_cmake-0.11.2}/pyproject.toml +1 -1
- {pytest_cmake-0.11.0 → pytest_cmake-0.11.2}/setup.py +1 -1
- {pytest_cmake-0.11.0 → pytest_cmake-0.11.2}/.gitignore +0 -0
- {pytest_cmake-0.11.0 → pytest_cmake-0.11.2}/LICENSE +0 -0
- {pytest_cmake-0.11.0 → pytest_cmake-0.11.2}/README.md +0 -0
- {pytest_cmake-0.11.0 → pytest_cmake-0.11.2}/build_backend.py +0 -0
- {pytest_cmake-0.11.0 → pytest_cmake-0.11.2}/build_config.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: pytest-cmake
|
3
|
-
Version: 0.11.
|
3
|
+
Version: 0.11.2
|
4
4
|
Summary: Provide CMake module for Pytest
|
5
5
|
Project-URL: Documentation, https://python-cmake.github.io/pytest-cmake
|
6
6
|
Project-URL: Repository, https://github.com/python-cmake/pytest-cmake
|
@@ -105,10 +105,9 @@ if (Pytest_FOUND AND NOT TARGET Pytest::Pytest)
|
|
105
105
|
set(_include_file "${CMAKE_CURRENT_BINARY_DIR}/${NAME}_include.cmake")
|
106
106
|
set(_tests_file "${CMAKE_CURRENT_BINARY_DIR}/${NAME}_tests.cmake")
|
107
107
|
|
108
|
-
|
109
|
-
|
110
|
-
${
|
111
|
-
BYPRODUCTS "${_tests_file}"
|
108
|
+
add_custom_command(
|
109
|
+
VERBATIM
|
110
|
+
OUTPUT "${_tests_file}"
|
112
111
|
DEPENDS ${_DEPENDS}
|
113
112
|
COMMAND ${CMAKE_COMMAND}
|
114
113
|
-D "PYTEST_EXECUTABLE=${PYTEST_EXECUTABLE}"
|
@@ -127,6 +126,9 @@ if (Pytest_FOUND AND NOT TARGET Pytest::Pytest)
|
|
127
126
|
-D "CTEST_FILE=${_tests_file}"
|
128
127
|
-P "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/PytestAddTests.cmake")
|
129
128
|
|
129
|
+
# Create a custom target to run the tests.
|
130
|
+
add_custom_target(${NAME} ALL DEPENDS ${_tests_file})
|
131
|
+
|
130
132
|
file(WRITE "${_include_file}"
|
131
133
|
"if(EXISTS \"${_tests_file}\")\n"
|
132
134
|
" include(\"${_tests_file}\")\n"
|
@@ -29,7 +29,7 @@ if(CMAKE_SCRIPT_MODE_FILE)
|
|
29
29
|
# Macro to create individual tests with optional test properties.
|
30
30
|
macro(create_test NAME IDENTIFIER)
|
31
31
|
string(APPEND _content
|
32
|
-
"add_test(
|
32
|
+
"add_test([==[${NAME}]==] \"${PYTEST_EXECUTABLE}\" [==[${IDENTIFIER}]==])\n"
|
33
33
|
)
|
34
34
|
|
35
35
|
# Prepare the properties for the test, including the environment settings.
|
@@ -45,12 +45,12 @@ if(CMAKE_SCRIPT_MODE_FILE)
|
|
45
45
|
endforeach()
|
46
46
|
|
47
47
|
# Append the test properties to the content.
|
48
|
-
string(APPEND _content "set_tests_properties(
|
48
|
+
string(APPEND _content "set_tests_properties([==[${NAME}]==] ${args})\n")
|
49
49
|
endmacro()
|
50
50
|
|
51
51
|
# If tests are bundled together, create a single test group.
|
52
52
|
if (BUNDLE_TESTS)
|
53
|
-
create_test("
|
53
|
+
create_test("\${TEST_GROUP_NAME}" "\${WORKING_DIRECTORY}")
|
54
54
|
|
55
55
|
else()
|
56
56
|
# Set environment variables for collecting tests.
|
@@ -133,7 +133,7 @@ if(CMAKE_SCRIPT_MODE_FILE)
|
|
133
133
|
set(test_case "${WORKING_DIRECTORY}/${line}")
|
134
134
|
|
135
135
|
# Create the test for CTest.
|
136
|
-
create_test("
|
136
|
+
create_test("\${test_name}" "\${test_case}")
|
137
137
|
endforeach()
|
138
138
|
|
139
139
|
# Warn if no tests were discovered.
|
@@ -9,7 +9,7 @@ backend-path = ["."]
|
|
9
9
|
|
10
10
|
[project]
|
11
11
|
name = "pytest-cmake"
|
12
|
-
version = "0.11.
|
12
|
+
version = "0.11.2"
|
13
13
|
description = "Provide CMake module for Pytest"
|
14
14
|
readme = "README.md"
|
15
15
|
requires-python = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|