pytest-cmake 0.11.3__tar.gz → 0.12.0__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.3 → pytest_cmake-0.12.0}/PKG-INFO +1 -1
- {pytest_cmake-0.11.3 → pytest_cmake-0.12.0}/cmake/FindPytest.cmake +12 -3
- {pytest_cmake-0.11.3 → pytest_cmake-0.12.0}/cmake/PytestAddTests.cmake +8 -1
- {pytest_cmake-0.11.3 → pytest_cmake-0.12.0}/pyproject.toml +1 -1
- {pytest_cmake-0.11.3 → pytest_cmake-0.12.0}/setup.py +1 -1
- {pytest_cmake-0.11.3 → pytest_cmake-0.12.0}/.gitignore +0 -0
- {pytest_cmake-0.11.3 → pytest_cmake-0.12.0}/LICENSE +0 -0
- {pytest_cmake-0.11.3 → pytest_cmake-0.12.0}/README.md +0 -0
- {pytest_cmake-0.11.3 → pytest_cmake-0.12.0}/build_backend.py +0 -0
- {pytest_cmake-0.11.3 → pytest_cmake-0.12.0}/build_config.py +0 -0
@@ -58,7 +58,7 @@ if (Pytest_FOUND AND NOT TARGET Pytest::Pytest)
|
|
58
58
|
cmake_parse_arguments(
|
59
59
|
PARSE_ARGV 1 "" "STRIP_PARAM_BRACKETS;INCLUDE_FILE_PATH;BUNDLE_TESTS"
|
60
60
|
"WORKING_DIRECTORY;TRIM_FROM_NAME;TRIM_FROM_FULL_NAME"
|
61
|
-
"LIBRARY_PATH_PREPEND;PYTHON_PATH_PREPEND;ENVIRONMENT;PROPERTIES;DEPENDS"
|
61
|
+
"LIBRARY_PATH_PREPEND;PYTHON_PATH_PREPEND;ENVIRONMENT;PROPERTIES;DEPENDS;EXTRA_ARGS"
|
62
62
|
)
|
63
63
|
|
64
64
|
# Set platform-specific library path environment variable.
|
@@ -71,8 +71,16 @@ if (Pytest_FOUND AND NOT TARGET Pytest::Pytest)
|
|
71
71
|
endif()
|
72
72
|
|
73
73
|
# Convert paths to CMake-friendly format.
|
74
|
-
|
75
|
-
|
74
|
+
if(DEFINED ENV{${LIBRARY_ENV_NAME}})
|
75
|
+
cmake_path(CONVERT "$ENV{${LIBRARY_ENV_NAME}}" TO_CMAKE_PATH_LIST LIBRARY_PATH)
|
76
|
+
else()
|
77
|
+
set(LIBRARY_PATH "")
|
78
|
+
endif()
|
79
|
+
if(DEFINED ENV{PYTHONPATH})
|
80
|
+
cmake_path(CONVERT "$ENV{PYTHONPATH}" TO_CMAKE_PATH_LIST PYTHON_PATH)
|
81
|
+
else()
|
82
|
+
set(PYTHON_PATH "")
|
83
|
+
endif()
|
76
84
|
|
77
85
|
# Prepend specified paths to the library and Python paths.
|
78
86
|
if (_LIBRARY_PATH_PREPEND)
|
@@ -124,6 +132,7 @@ if (Pytest_FOUND AND NOT TARGET Pytest::Pytest)
|
|
124
132
|
-D "ENVIRONMENT=${_ENVIRONMENT}"
|
125
133
|
-D "TEST_PROPERTIES=${_PROPERTIES}"
|
126
134
|
-D "CTEST_FILE=${_tests_file}"
|
135
|
+
-D "EXTRA_ARGS=${_EXTRA_ARGS}"
|
127
136
|
-P "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/PytestAddTests.cmake")
|
128
137
|
|
129
138
|
# Create a custom target to run the tests.
|
@@ -26,10 +26,17 @@ if(CMAKE_SCRIPT_MODE_FILE)
|
|
26
26
|
list(APPEND ENCODED_ENVIRONMENT "${env}")
|
27
27
|
endforeach()
|
28
28
|
|
29
|
+
# Handle EXTRA_ARGS for individual tests
|
30
|
+
set(EXTRA_ARGS_WRAPPED)
|
31
|
+
foreach(arg IN LISTS EXTRA_ARGS)
|
32
|
+
list(APPEND EXTRA_ARGS_WRAPPED "[==[${arg}]==]")
|
33
|
+
endforeach()
|
34
|
+
list(JOIN EXTRA_ARGS_WRAPPED " " EXTRA_ARGS_STR)
|
35
|
+
|
29
36
|
# Macro to create individual tests with optional test properties.
|
30
37
|
macro(create_test NAME IDENTIFIER)
|
31
38
|
string(APPEND _content
|
32
|
-
"add_test([==[${NAME}]==] \"${PYTEST_EXECUTABLE}\" [==[${IDENTIFIER}]==])\n"
|
39
|
+
"add_test([==[${NAME}]==] \"${PYTEST_EXECUTABLE}\" [==[${IDENTIFIER}]==] ${EXTRA_ARGS_STR} )\n"
|
33
40
|
)
|
34
41
|
|
35
42
|
# Prepare the properties for the test, including the environment settings.
|
@@ -9,7 +9,7 @@ backend-path = ["."]
|
|
9
9
|
|
10
10
|
[project]
|
11
11
|
name = "pytest-cmake"
|
12
|
-
version = "0.
|
12
|
+
version = "0.12.0"
|
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
|