pytest-cmake 0.11.4__tar.gz → 0.13.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.4 → pytest_cmake-0.13.0}/PKG-INFO +1 -1
- {pytest_cmake-0.11.4 → pytest_cmake-0.13.0}/cmake/FindPytest.cmake +3 -1
- {pytest_cmake-0.11.4 → pytest_cmake-0.13.0}/cmake/PytestAddTests.cmake +13 -2
- {pytest_cmake-0.11.4 → pytest_cmake-0.13.0}/pyproject.toml +1 -1
- {pytest_cmake-0.11.4 → pytest_cmake-0.13.0}/setup.py +1 -1
- {pytest_cmake-0.11.4 → pytest_cmake-0.13.0}/.gitignore +0 -0
- {pytest_cmake-0.11.4 → pytest_cmake-0.13.0}/LICENSE +0 -0
- {pytest_cmake-0.11.4 → pytest_cmake-0.13.0}/README.md +0 -0
- {pytest_cmake-0.11.4 → pytest_cmake-0.13.0}/build_backend.py +0 -0
- {pytest_cmake-0.11.4 → pytest_cmake-0.13.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;DISCOVERY_EXTRA_ARGS"
|
62
62
|
)
|
63
63
|
|
64
64
|
# Set platform-specific library path environment variable.
|
@@ -132,6 +132,8 @@ if (Pytest_FOUND AND NOT TARGET Pytest::Pytest)
|
|
132
132
|
-D "ENVIRONMENT=${_ENVIRONMENT}"
|
133
133
|
-D "TEST_PROPERTIES=${_PROPERTIES}"
|
134
134
|
-D "CTEST_FILE=${_tests_file}"
|
135
|
+
-D "EXTRA_ARGS=${_EXTRA_ARGS}"
|
136
|
+
-D "DISCOVERY_EXTRA_ARGS=${_DISCOVERY_EXTRA_ARGS}"
|
135
137
|
-P "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/PytestAddTests.cmake")
|
136
138
|
|
137
139
|
# Create a custom target to run the tests.
|
@@ -26,10 +26,21 @@ 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
|
+
if(BUNDLE_TESTS)
|
31
|
+
list(PREPEND EXTRA_ARGS ${DISCOVERY_EXTRA_ARGS})
|
32
|
+
endif()
|
33
|
+
|
34
|
+
set(EXTRA_ARGS_WRAPPED)
|
35
|
+
foreach(arg IN LISTS EXTRA_ARGS)
|
36
|
+
list(APPEND EXTRA_ARGS_WRAPPED "[==[${arg}]==]")
|
37
|
+
endforeach()
|
38
|
+
list(JOIN EXTRA_ARGS_WRAPPED " " EXTRA_ARGS_STR)
|
39
|
+
|
29
40
|
# Macro to create individual tests with optional test properties.
|
30
41
|
macro(create_test NAME IDENTIFIER)
|
31
42
|
string(APPEND _content
|
32
|
-
"add_test([==[${NAME}]==] \"${PYTEST_EXECUTABLE}\" [==[${IDENTIFIER}]==])\n"
|
43
|
+
"add_test([==[${NAME}]==] \"${PYTEST_EXECUTABLE}\" [==[${IDENTIFIER}]==] ${EXTRA_ARGS_STR} )\n"
|
33
44
|
)
|
34
45
|
|
35
46
|
# Prepare the properties for the test, including the environment settings.
|
@@ -62,7 +73,7 @@ if(CMAKE_SCRIPT_MODE_FILE)
|
|
62
73
|
execute_process(
|
63
74
|
COMMAND "${PYTEST_EXECUTABLE}"
|
64
75
|
--collect-only -q
|
65
|
-
--rootdir=${WORKING_DIRECTORY} .
|
76
|
+
--rootdir=${WORKING_DIRECTORY} ${DISCOVERY_EXTRA_ARGS} .
|
66
77
|
OUTPUT_VARIABLE _output_lines
|
67
78
|
ERROR_VARIABLE _output_lines
|
68
79
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
@@ -9,7 +9,7 @@ backend-path = ["."]
|
|
9
9
|
|
10
10
|
[project]
|
11
11
|
name = "pytest-cmake"
|
12
|
-
version = "0.
|
12
|
+
version = "0.13.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
|