Skip to content

Commit 546fd67

Browse files
committed
Fix: Only enable integration tests when venv can be created
The CTest - integration test integration incorrectly assumes that if a Python interpreter was installed, we could create a venv. This PR fixes that incorrect assumption. Signed-off-by: Patrick M. Niedzielski <[email protected]>
1 parent 5821343 commit 546fd67

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/integration-tests/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,15 @@ execute_process(
2121
"${Python3_EXECUTABLE}"
2222
-m venv
2323
"${CMAKE_CURRENT_BINARY_DIR}/venv"
24+
RESULT_VARIABLE STATUS
2425
)
26+
if(STATUS AND NOT STATUS EQUAL 0)
27+
message(WARN
28+
"Could not create Python virtual environment; disabling integration tests"
29+
)
30+
list(POP_BACK CMAKE_MESSAGE_INDENT)
31+
return()
32+
endif()
2533

2634
# Forget about the system Python version; look for Python 3 installed within
2735
# the virtual environment now.

0 commit comments

Comments
 (0)