r344288 - [python] [tests] Fix calling tests on Windows

Michal Gorny via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 11 13:26:55 PDT 2018


Author: mgorny
Date: Thu Oct 11 13:26:55 2018
New Revision: 344288

URL: http://llvm.org/viewvc/llvm-project?rev=344288&view=rev
Log:
[python] [tests] Fix calling tests on Windows

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

Differential Revision: https://reviews.llvm.org/D53151

Modified:
    cfe/trunk/bindings/python/tests/CMakeLists.txt

Modified: cfe/trunk/bindings/python/tests/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/bindings/python/tests/CMakeLists.txt?rev=344288&r1=344287&r2=344288&view=diff
==============================================================================
--- cfe/trunk/bindings/python/tests/CMakeLists.txt (original)
+++ cfe/trunk/bindings/python/tests/CMakeLists.txt Thu Oct 11 13:26:55 2018
@@ -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}/..)
 




More information about the cfe-commits mailing list