Skip to content

Commit

Permalink
[python] [tests] Fix calling tests on Windows
Browse files Browse the repository at this point in the history
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

llvm-svn: 344288
  • Loading branch information
mgorny committed Oct 11, 2018
1 parent f04bed8 commit d50a431
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion clang/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}/..)

Expand Down

0 comments on commit d50a431

Please sign in to comment.