Re: r344241 - [tests] Include Python binding tests in CMake rules

2019-01-16 Thread Nico Weber via cfe-commits
(Follow-up: Michał landed a fix in r351304. Thanks!)

On Tue, Jan 15, 2019 at 1:21 PM Nico Weber  wrote:

> As long as check-all passes with LLVM_ENABLE_PIC=OFF I'm happy :-) (Note
> it's .dylib on macOS and .dll on Windows, and by default
> setting LLVM_ENABLE_PIC=OFF causes a static library to be created instead
> on non-win).
>
> On Tue, Jan 15, 2019 at 1:16 PM Michał Górny  wrote:
>
>> On Tue, 2019-01-15 at 13:10 -0500, Nico Weber wrote:
>> > The tests probably shouldn't run when LLVM_ENABLE_PIC=OFF is set, since
>> > they all fail there (due to lib/libclang.so not existing).
>>
>> Hmm, maybe we could make them conditional to the existence
>> of libclang.so target?  Would that work for you?
>>
>> >
>> > On Thu, Oct 11, 2018 at 7:59 AM Michal Gorny via cfe-commits <
>> > cfe-commits@lists.llvm.org> wrote:
>> >
>> > > Author: mgorny
>> > > Date: Thu Oct 11 04:58:14 2018
>> > > New Revision: 344241
>> > >
>> > > URL: http://llvm.org/viewvc/llvm-project?rev=344241=rev
>> > > Log:
>> > > [tests] Include Python binding tests in CMake rules
>> > >
>> > > Add a new CMake rule check-clang-python to run the Python bindings'
>> > > test suite, and include it in check-all.
>> > >
>> > > Differential Revision: https://reviews.llvm.org/D52840
>> > >
>> > > Added:
>> > > cfe/trunk/bindings/python/tests/CMakeLists.txt
>> > > Modified:
>> > > cfe/trunk/CMakeLists.txt
>> > >
>> > > Modified: cfe/trunk/CMakeLists.txt
>> > > URL:
>> > >
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=344241=344240=344241=diff
>> > >
>> > >
>> ==
>> > > --- cfe/trunk/CMakeLists.txt (original)
>> > > +++ cfe/trunk/CMakeLists.txt Thu Oct 11 04:58:14 2018
>> > > @@ -502,6 +502,7 @@ if( CLANG_INCLUDE_TESTS )
>> > >)
>> > >endif()
>> > >add_subdirectory(utils/perf-training)
>> > > +  add_subdirectory(bindings/python/tests)
>> > >  endif()
>> > >
>> > >  option(CLANG_INCLUDE_DOCS "Generate build targets for the Clang
>> docs."
>> > >
>> > > Added: cfe/trunk/bindings/python/tests/CMakeLists.txt
>> > > URL:
>> > >
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/bindings/python/tests/CMakeLists.txt?rev=344241=auto
>> > >
>> > >
>> ==
>> > > --- cfe/trunk/bindings/python/tests/CMakeLists.txt (added)
>> > > +++ cfe/trunk/bindings/python/tests/CMakeLists.txt Thu Oct 11
>> 04:58:14 2018
>> > > @@ -0,0 +1,7 @@
>> > > +# Test target to run Python test suite from main build.
>> > > +
>> > > +add_custom_target(check-clang-python
>> > > +   COMMAND CLANG_LIBRARY_PATH=$
>> > > ${PYTHON_EXECUTABLE} -m unittest discover
>> > > +   DEPENDS libclang
>> > > +   WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..)
>> > > +add_dependencies(check-all check-clang-python)
>> > >
>> > >
>> > > ___
>> > > cfe-commits mailing list
>> > > cfe-commits@lists.llvm.org
>> > > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>> > >
>>
>> --
>> Best regards,
>> Michał Górny
>>
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: r344241 - [tests] Include Python binding tests in CMake rules

2019-01-15 Thread Nico Weber via cfe-commits
As long as check-all passes with LLVM_ENABLE_PIC=OFF I'm happy :-) (Note
it's .dylib on macOS and .dll on Windows, and by default
setting LLVM_ENABLE_PIC=OFF causes a static library to be created instead
on non-win).

On Tue, Jan 15, 2019 at 1:16 PM Michał Górny  wrote:

> On Tue, 2019-01-15 at 13:10 -0500, Nico Weber wrote:
> > The tests probably shouldn't run when LLVM_ENABLE_PIC=OFF is set, since
> > they all fail there (due to lib/libclang.so not existing).
>
> Hmm, maybe we could make them conditional to the existence
> of libclang.so target?  Would that work for you?
>
> >
> > On Thu, Oct 11, 2018 at 7:59 AM Michal Gorny via cfe-commits <
> > cfe-commits@lists.llvm.org> wrote:
> >
> > > Author: mgorny
> > > Date: Thu Oct 11 04:58:14 2018
> > > New Revision: 344241
> > >
> > > URL: http://llvm.org/viewvc/llvm-project?rev=344241=rev
> > > Log:
> > > [tests] Include Python binding tests in CMake rules
> > >
> > > Add a new CMake rule check-clang-python to run the Python bindings'
> > > test suite, and include it in check-all.
> > >
> > > Differential Revision: https://reviews.llvm.org/D52840
> > >
> > > Added:
> > > cfe/trunk/bindings/python/tests/CMakeLists.txt
> > > Modified:
> > > cfe/trunk/CMakeLists.txt
> > >
> > > Modified: cfe/trunk/CMakeLists.txt
> > > URL:
> > >
> http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=344241=344240=344241=diff
> > >
> > >
> ==
> > > --- cfe/trunk/CMakeLists.txt (original)
> > > +++ cfe/trunk/CMakeLists.txt Thu Oct 11 04:58:14 2018
> > > @@ -502,6 +502,7 @@ if( CLANG_INCLUDE_TESTS )
> > >)
> > >endif()
> > >add_subdirectory(utils/perf-training)
> > > +  add_subdirectory(bindings/python/tests)
> > >  endif()
> > >
> > >  option(CLANG_INCLUDE_DOCS "Generate build targets for the Clang docs."
> > >
> > > Added: cfe/trunk/bindings/python/tests/CMakeLists.txt
> > > URL:
> > >
> http://llvm.org/viewvc/llvm-project/cfe/trunk/bindings/python/tests/CMakeLists.txt?rev=344241=auto
> > >
> > >
> ==
> > > --- cfe/trunk/bindings/python/tests/CMakeLists.txt (added)
> > > +++ cfe/trunk/bindings/python/tests/CMakeLists.txt Thu Oct 11 04:58:14
> 2018
> > > @@ -0,0 +1,7 @@
> > > +# Test target to run Python test suite from main build.
> > > +
> > > +add_custom_target(check-clang-python
> > > +   COMMAND CLANG_LIBRARY_PATH=$
> > > ${PYTHON_EXECUTABLE} -m unittest discover
> > > +   DEPENDS libclang
> > > +   WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..)
> > > +add_dependencies(check-all check-clang-python)
> > >
> > >
> > > ___
> > > cfe-commits mailing list
> > > cfe-commits@lists.llvm.org
> > > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
> > >
>
> --
> Best regards,
> Michał Górny
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: r344241 - [tests] Include Python binding tests in CMake rules

2019-01-15 Thread Michał Górny via cfe-commits
On Tue, 2019-01-15 at 13:10 -0500, Nico Weber wrote:
> The tests probably shouldn't run when LLVM_ENABLE_PIC=OFF is set, since
> they all fail there (due to lib/libclang.so not existing).

Hmm, maybe we could make them conditional to the existence
of libclang.so target?  Would that work for you?

> 
> On Thu, Oct 11, 2018 at 7:59 AM Michal Gorny via cfe-commits <
> cfe-commits@lists.llvm.org> wrote:
> 
> > Author: mgorny
> > Date: Thu Oct 11 04:58:14 2018
> > New Revision: 344241
> > 
> > URL: http://llvm.org/viewvc/llvm-project?rev=344241=rev
> > Log:
> > [tests] Include Python binding tests in CMake rules
> > 
> > Add a new CMake rule check-clang-python to run the Python bindings'
> > test suite, and include it in check-all.
> > 
> > Differential Revision: https://reviews.llvm.org/D52840
> > 
> > Added:
> > cfe/trunk/bindings/python/tests/CMakeLists.txt
> > Modified:
> > cfe/trunk/CMakeLists.txt
> > 
> > Modified: cfe/trunk/CMakeLists.txt
> > URL:
> > http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=344241=344240=344241=diff
> > 
> > ==
> > --- cfe/trunk/CMakeLists.txt (original)
> > +++ cfe/trunk/CMakeLists.txt Thu Oct 11 04:58:14 2018
> > @@ -502,6 +502,7 @@ if( CLANG_INCLUDE_TESTS )
> >)
> >endif()
> >add_subdirectory(utils/perf-training)
> > +  add_subdirectory(bindings/python/tests)
> >  endif()
> > 
> >  option(CLANG_INCLUDE_DOCS "Generate build targets for the Clang docs."
> > 
> > Added: cfe/trunk/bindings/python/tests/CMakeLists.txt
> > URL:
> > http://llvm.org/viewvc/llvm-project/cfe/trunk/bindings/python/tests/CMakeLists.txt?rev=344241=auto
> > 
> > ==
> > --- cfe/trunk/bindings/python/tests/CMakeLists.txt (added)
> > +++ cfe/trunk/bindings/python/tests/CMakeLists.txt Thu Oct 11 04:58:14 2018
> > @@ -0,0 +1,7 @@
> > +# Test target to run Python test suite from main build.
> > +
> > +add_custom_target(check-clang-python
> > +   COMMAND CLANG_LIBRARY_PATH=$
> > ${PYTHON_EXECUTABLE} -m unittest discover
> > +   DEPENDS libclang
> > +   WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..)
> > +add_dependencies(check-all check-clang-python)
> > 
> > 
> > ___
> > cfe-commits mailing list
> > cfe-commits@lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
> > 

-- 
Best regards,
Michał Górny


signature.asc
Description: This is a digitally signed message part
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: r344241 - [tests] Include Python binding tests in CMake rules

2019-01-15 Thread Nico Weber via cfe-commits
The tests probably shouldn't run when LLVM_ENABLE_PIC=OFF is set, since
they all fail there (due to lib/libclang.so not existing).

On Thu, Oct 11, 2018 at 7:59 AM Michal Gorny via cfe-commits <
cfe-commits@lists.llvm.org> wrote:

> Author: mgorny
> Date: Thu Oct 11 04:58:14 2018
> New Revision: 344241
>
> URL: http://llvm.org/viewvc/llvm-project?rev=344241=rev
> Log:
> [tests] Include Python binding tests in CMake rules
>
> Add a new CMake rule check-clang-python to run the Python bindings'
> test suite, and include it in check-all.
>
> Differential Revision: https://reviews.llvm.org/D52840
>
> Added:
> cfe/trunk/bindings/python/tests/CMakeLists.txt
> Modified:
> cfe/trunk/CMakeLists.txt
>
> Modified: cfe/trunk/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=344241=344240=344241=diff
>
> ==
> --- cfe/trunk/CMakeLists.txt (original)
> +++ cfe/trunk/CMakeLists.txt Thu Oct 11 04:58:14 2018
> @@ -502,6 +502,7 @@ if( CLANG_INCLUDE_TESTS )
>)
>endif()
>add_subdirectory(utils/perf-training)
> +  add_subdirectory(bindings/python/tests)
>  endif()
>
>  option(CLANG_INCLUDE_DOCS "Generate build targets for the Clang docs."
>
> Added: cfe/trunk/bindings/python/tests/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/bindings/python/tests/CMakeLists.txt?rev=344241=auto
>
> ==
> --- cfe/trunk/bindings/python/tests/CMakeLists.txt (added)
> +++ cfe/trunk/bindings/python/tests/CMakeLists.txt Thu Oct 11 04:58:14 2018
> @@ -0,0 +1,7 @@
> +# Test target to run Python test suite from main build.
> +
> +add_custom_target(check-clang-python
> +   COMMAND CLANG_LIBRARY_PATH=$
> ${PYTHON_EXECUTABLE} -m unittest discover
> +   DEPENDS libclang
> +   WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..)
> +add_dependencies(check-all check-clang-python)
>
>
> ___
> cfe-commits mailing list
> cfe-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r344241 - [tests] Include Python binding tests in CMake rules

2018-10-11 Thread Michal Gorny via cfe-commits
Author: mgorny
Date: Thu Oct 11 04:58:14 2018
New Revision: 344241

URL: http://llvm.org/viewvc/llvm-project?rev=344241=rev
Log:
[tests] Include Python binding tests in CMake rules

Add a new CMake rule check-clang-python to run the Python bindings'
test suite, and include it in check-all.

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

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

Modified: cfe/trunk/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=344241=344240=344241=diff
==
--- cfe/trunk/CMakeLists.txt (original)
+++ cfe/trunk/CMakeLists.txt Thu Oct 11 04:58:14 2018
@@ -502,6 +502,7 @@ if( CLANG_INCLUDE_TESTS )
   )
   endif()
   add_subdirectory(utils/perf-training)
+  add_subdirectory(bindings/python/tests)
 endif()
 
 option(CLANG_INCLUDE_DOCS "Generate build targets for the Clang docs."

Added: cfe/trunk/bindings/python/tests/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/bindings/python/tests/CMakeLists.txt?rev=344241=auto
==
--- cfe/trunk/bindings/python/tests/CMakeLists.txt (added)
+++ cfe/trunk/bindings/python/tests/CMakeLists.txt Thu Oct 11 04:58:14 2018
@@ -0,0 +1,7 @@
+# Test target to run Python test suite from main build.
+
+add_custom_target(check-clang-python
+   COMMAND CLANG_LIBRARY_PATH=$ 
${PYTHON_EXECUTABLE} -m unittest discover
+   DEPENDS libclang
+   WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..)
+add_dependencies(check-all check-clang-python)


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits