Re: ECM unittest fails, why?

2020-03-23 Thread Friedrich W. H. Kossebau
Am Sonntag, 22. März 2020, 10:50:39 CET schrieb David Faure:
> The CI for ECM has been failing ever since the tests were re-enabled.
> 
> https://build.kde.org/job/Frameworks/view/Platform%20-%20SUSEQt5.12/job/extr
> a-cmake-modules/job/kf5-qt5%20SUSEQt5.12/103/console shows that
> ECMPoQmToolsTest fails with "tr_thread_test.moc: No such file or
> directory".
> 
> I have been trying to reproduce this locally, but no such luck.

Reason seems to be that on CI the target tr_thread_test is handled before 
tr_thread_test_2, while for us locally the order is the other way around.
And with tr_thread_test_2 the file tr_thread_test.moc is generated first, so 
present in build dir afterwards, while with tr_thread_test the automoc seems 
not happening, other than what the code hopes (perhaps some cmake policy 
change since that code was written?).

In general the test setup here seems bogus a bit, as one would expect that the 
two different test cases (1 & 2) should not share the same url for the 
generated moc file and have them in respective exclusive include dirs.

I might have a closer look later tonight, if no-one else would work on this.

Cheers
Friedrich




Fwd: ECM unittest fails, why?

2020-03-23 Thread Johan Ouwerkerk
(Forwarded because I failed to reply to the list properly)

On Sun, Mar 22, 2020 at 9:12 PM David Faure  wrote:
>
> Thanks for your reply.
>
> Can you reproduce the failure?
> I tried inserting a make clean in the instructions from my previous email,
> still passes.
>

No, I only looked at the logs and went "hmm..." at the `make clean`
which seemed to occur between moc and compile step(s).
One other thing you could try to do is to replicate the CI environment
more closely:

 1. docker pull the CI image, or build it locally
https://invent.kde.org/sysadmin/ci-tooling/-/tree/master/system-images
 2. Run the image, assuming it was tagged with debug:latest do
something like: docker run -it --entrypoint /bin/sh debug:latest You
should now have a shell inside a running container that looks fairly
similar to the actual build environment in CI.
 3. Then navigate your way around in the shell and try and reproduce
it there: creating a few dirs, git clone from anongit.kde, cmake,
gmake, ctest.

Regards,

 - Johan