[PATCH xorg-gtest v2 0/9] Switch from a precompiled library to a source distribution
memsize at videotron.ca
Wed Mar 14 05:57:01 PDT 2012
On 12-03-14 02:35 AM, Chase Douglas wrote:
> On 03/13/2012 10:39 PM, Chase Douglas wrote:
>> On 03/13/2012 07:30 PM, Gaetan Nadon wrote:
>>> On 12-03-13 08:53 PM, Gaetan Nadon wrote:
>>>> On 12-03-13 02:47 PM, Chase Douglas wrote:
>>>>> The major change in this round is to patch 8. Instead of instructing users to
>>>>> include an automake snippet installed on the system, the README now says to copy
>>>>> the snippet into the project. The snippet needs to be available before
>>>>> autoreconf is run. It would be possible to copy the snippet into place in
>>>>> autogen.sh, but that would be a very non-standard solution to the problem and
>>>>> would require the user to have xorg-gtest installed.
>>>>> The xorg-gtest.m4 macro now sets BASE_CXXFLAGS and STRICT_CXXFLAGS properly.
>>>>> The other change is the addition of patch 9. It allows for the Xorg binary to be
>>>>> set through a compilation flag. This should make it possible to use xorg-gtest's
>>>>> main() with an Xorg server built in the xserver project.
>>>>> All XORG_MACROS_VERSION calls have been updated to require 1.17 for
>>>>> -- Chase
>>>> Some quick testing:
>>>> Applying: Ship xorg-gtest.m4 and Makefile-xorg-gtest.am
>>>> trailing whitespace.
>>>> Moreover, a custom main() function that takes care of setting up the
>>>> trailing whitespace.
>>>> replacement for libgtest_main.a
>>>> warning: 2 lines add whitespace errors.
>>>> $ make distcheck:
>>>> make: Entering directory
>>>> CXX libgtest_a-gtest-all.o
>>>> CXX libxorg_gtest_a-xorg-gtest-all.o
>>>> CXX libxorg_gtest_main_a-xorg-gtest_main.o
>>>> CXX xorg-gtest-example.o
>>>> In file included from ../../src/device.cpp:28:0,
>>>> from ../../src/xorg-gtest-all.cpp:28:
>>>> ../../include/xorg/gtest/evemu/device.h:36:19: fatal error: evemu.h: No
>>> Something needs to be conditionally included when evemu package is not
>>>> such file or directory
>>>> compilation terminated.
>>>> make: *** [libxorg_gtest_a-xorg-gtest-all.o] Error 1
>> I hadn't tried make distcheck while libutouch-evemu was not installed.
>> This was a simple fix: inside xorg-gtest-all.cpp, wrap #include
>> "device.cpp" in a #ifdef HAVE_EVEMU.
>> Now it builds and checks without issue with or without utouch-evemu
>>>> *** Update comment as well with 1.17 *** We've all done this :-)
>>>> # Require X.Org macros 1.16 or later for XORG_TESTSET_CFLAG
>>>> [m4_fatal([must install xorg-macros 1.16 or later before running
>>>> Running "make all" or "make clean" does not produce anything, no targets
>>>> to build or clean. This is strange as distcheck does find something to
>>>> compile. Sorry, I did not have time to investigate, maybe it is just a
>>>> local problem.
>>> Ok, 'make check' is the target to invoke. Running 'distcheck' always
>>> runs 'check'.
>> Correct. We don't ship a library anymore, so there's no reason to build
>> anything during normal make. Make check can be run to ensure that it
>> builds and runs against the installed X server. If you disable
>> integration tests, it will not attempt to run the example test.
>>>> I have libgtest-dev installed but not libutouch-evemu-dev.
>>> I installed evemu lib and the compilation is ok. However the TESTS
>>> fails, so distcheck fails.
>>> make check-TESTS
>>> make: Entering directory
>>> [==========] Running 1 test from 1 test case.
>>> [----------] Global test environment set-up.
>>> unknown file: Failure
>>> C++ exception with description "Dummy X server failed to start, did
>>> you run as root?" thrown in auxiliary test code (environments or
>>> event listeners).
>>> FAIL: xorg-gtest-example
>>> 1 of 1 test failed
>>> make: *** [check-TESTS] Error 1
>>> If the intention was to run "integration" tests which requires root or
>>> other special requirements, rather than a module unit testing, this will
>>> conflict with the purpose of distcheck.
>> The exception comment is a little old. With X server 1.12 you don't need
>> to be root to run xorg-gtest tests.
>> I'm not sure why it failed for you. Can you check /tmp/Xorg.GTest.log?
>> Do you have the xserver installed?
>> As for integration tests in xorg-gtest's distcheck, I'm not sure what is
>> best, but I am leaning towards checking with the integration test as it
>> exists today. It only requires that the xserver is available. I think
>> that's a reasonable requirement for someone releasing xorg-gtest. They
>> should be sure that it does work with the xserver.
>> I have updated my "source" branch at
>> git://people.freedesktop.org/~cndougla/xorg-gtest with the fix for the
>> no-evemu build failure and the whitespace fixes. Once we resolve your
>> test run failure I can send out a revision of the patches that hopefully
>> resolves everything.
> I just pushed a new commit to my "source" branch to print out a more
> helpful error message when the server fails to start.
> -- Chase
The 'make check' is picking up my locally built X binary which I never
use and is in an unknown state. The log in /tmp shows it fails as it
cannot find a driver. This is expected in my situation.
I tried the "source" branch of
<git://people.freedesktop.org/%7Ecndougla/xorg-gtest> without any
patches, but I get a compile error:
xorg-gtest-example.cpp:1:29: fatal error: xorg/gtest/test.h: No such
file or directory
It looks like everything has been explained.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the xorg-devel