[PATCH] D53151: [python] [tests] Fix calling pytest on Windows (hopefully)

Michał Górny via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 11 10:59:26 PDT 2018


mgorny created this revision.
mgorny added a reviewer: rnk.

Fix passing arguments to the pytest command to use 'env' builtin CMake
command, in order to fix compatibility with Windows.

NB: I don't have a Windows environment to test it


Repository:
  rC Clang

https://reviews.llvm.org/D53151

Files:
  bindings/python/tests/CMakeLists.txt


Index: bindings/python/tests/CMakeLists.txt
===================================================================
--- bindings/python/tests/CMakeLists.txt
+++ bindings/python/tests/CMakeLists.txt
@@ -1,7 +1,9 @@
 # Test target to run Python test suite from main build.
 
 add_custom_target(check-clang-python
-    COMMAND CLANG_LIBRARY_PATH=$<TARGET_FILE_DIR:libclang> ${PYTHON_EXECUTABLE} -m unittest discover
+    COMMAND ${CMAKE_COMMAND} -E env
+            CLANG_LIBRARY_PATH=$<TARGET_FILE_DIR:libclang>
+            ${PYTHON_EXECUTABLE} -m unittest discover
     DEPENDS libclang
     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..)
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53151.169253.patch
Type: text/x-patch
Size: 640 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181011/db77c9b5/attachment.bin>


More information about the cfe-commits mailing list