Re: Buildd-setup faffing around with __FILE__ breaks my unit tests.

2019-02-10 Thread Ximin Luo
Sune Vuorela: > On Sunday, February 10, 2019 10:05:00 PM CET you wrote: >> To fix this in other projects, we would have to patch all uses of __FILE__ >> to something like strip_prefix(PREFIX, __FILE__), pass in PREFIX from the > > But why not just record the build directory as part of the environ

Re: Buildd-setup faffing around with __FILE__ breaks my unit tests.

2019-02-10 Thread Sune Vuorela
On Sunday, February 10, 2019 10:05:00 PM CET you wrote: > To fix this in other projects, we would have to patch all uses of __FILE__ > to something like strip_prefix(PREFIX, __FILE__), pass in PREFIX from the But why not just record the build directory as part of the environment that aren't allo

Re: Buildd-setup faffing around with __FILE__ breaks my unit tests.

2019-02-10 Thread Ximin Luo
Sune Vuorela: > On Sunday, February 10, 2019 8:38:00 PM CET Ximin Luo wrote: >> Yes, pass the source dir in through the build system "somehow", there are >> lots of possible ways you can do this, and this is what every other test >> runner does. A command-line argument or environment variable would

Re: Buildd-setup faffing around with __FILE__ breaks my unit tests.

2019-02-10 Thread Sune Vuorela
On Sunday, February 10, 2019 8:38:00 PM CET Ximin Luo wrote: > Yes, pass the source dir in through the build system "somehow", there are > lots of possible ways you can do this, and this is what every other test > runner does. A command-line argument or environment variable would be > simplest. So

Re: Buildd-setup faffing around with __FILE__ breaks my unit tests.

2019-02-10 Thread Ximin Luo
Sune Vuorela: > [..] > > What would you suggest changing the macro to ? I can then try push it > upstream. > >> Lots of other test runners do perfectly well without __FILE__, QT tests are >> not special. > > I haven't yet found a c++ test system that actually has this feature. The > internet

Re: Buildd-setup faffing around with __FILE__ breaks my unit tests.

2019-02-10 Thread Sune Vuorela
On Sunday, February 10, 2019 8:17:00 PM CET Ximin Luo wrote: > Acceptable usecases are those that make fewest assumptions about the > behaviour of __FILE__, which has never been guaranteed to do what the QT > test macro assumes it does. Let's read the docs: https://gcc.gnu.org/onlinedocs/cpp/Stand

Re: Buildd-setup faffing around with __FILE__ breaks my unit tests.

2019-02-10 Thread Ximin Luo
Sune Vuorela: > On Sunday, February 10, 2019 8:00:00 PM CET Ximin Luo wrote: >> i.e. QT tests shouldn't use __FILE__, they should use something else. > > What should they use? A custom macro that the build system passes into > instead? > > That's just silly. So what are your actual suggestion t

Re: Buildd-setup faffing around with __FILE__ breaks my unit tests.

2019-02-10 Thread Sune Vuorela
On Sunday, February 10, 2019 8:00:00 PM CET Ximin Luo wrote: > i.e. QT tests shouldn't use __FILE__, they should use something else. What should they use? A custom macro that the build system passes into instead? That's just silly. So what are your actual suggestion to find the source tree fro

Re: Buildd-setup faffing around with __FILE__ breaks my unit tests.

2019-02-10 Thread Ximin Luo
Sune Vuorela: > On Sunday, February 10, 2019 3:08:00 AM CET Ximin Luo wrote: >> Sune Vuorela: >>> [..] >>> >>> My suggestion is to not change the meaning of __FILE__ and instead fix the >>> programs that uses __FILE__ for something they shouldn't. >> >> You should pass this request to the QT test m

Re: Buildd-setup faffing around with __FILE__ breaks my unit tests.

2019-02-10 Thread Holger Levsen
On Sun, Feb 10, 2019 at 04:41:10PM +0100, Sune Vuorela wrote: > (Please keep me CC'ed. Not subscribed) ack. > If you have magic regexes to auto tag issues, lines matching > /WARNING: .* testdata .* could not be located!/ > would probably find those where it applies to current test cases, at leas

Re: Buildd-setup faffing around with __FILE__ breaks my unit tests.

2019-02-10 Thread Sune Vuorela
(Please keep me CC'ed. Not subscribed) On Sunday, February 10, 2019 4:05:05 PM CET Holger Levsen wrote: > for now I've just added knotifications to ftbfs_due_to_f-file-prefix-map. > > Not sure what else to do about this right now. If you have magic regexes to auto tag issues, lines matching /WARN

Re: Buildd-setup faffing around with __FILE__ breaks my unit tests.

2019-02-10 Thread Holger Levsen
On Sun, Feb 10, 2019 at 03:58:15PM +0100, Sune Vuorela wrote: > On Sunday, February 10, 2019 3:34:27 PM CET Holger Levsen wrote: > > On Sat, Feb 09, 2019 at 07:54:16PM +0100, Sune Vuorela wrote: > > > (Please keep me CC'ed. Not subscribed) > > done. > thanks. and again :) > According to debian co

Re: Buildd-setup faffing around with __FILE__ breaks my unit tests.

2019-02-10 Thread Sune Vuorela
On Sunday, February 10, 2019 3:34:27 PM CET Holger Levsen wrote: > On Sat, Feb 09, 2019 at 07:54:16PM +0100, Sune Vuorela wrote: > > (Please keep me CC'ed. Not subscribed) > > done. thanks. > this is unfortunate to say the least. > > we are tracking these problems at > https://tests.reproducib

Re: Buildd-setup faffing around with __FILE__ breaks my unit tests.

2019-02-10 Thread Holger Levsen
Hi Sune, thanks for reaching out to us! On Sat, Feb 09, 2019 at 07:54:16PM +0100, Sune Vuorela wrote: > (Please keep me CC'ed. Not subscribed) done. > The latest incarnations of the reproducible build autobuilder setup passes > some options to gcc to not let __FILE__ actualy be the full file

Re: Buildd-setup faffing around with __FILE__ breaks my unit tests.

2019-02-10 Thread Sune Vuorela
On Sunday, February 10, 2019 3:08:00 AM CET Ximin Luo wrote: > Sune Vuorela: > > [..] > > > > My suggestion is to not change the meaning of __FILE__ and instead fix the > > programs that uses __FILE__ for something they shouldn't. > > You should pass this request to the QT test maintainers. This

Re: Buildd-setup faffing around with __FILE__ breaks my unit tests.

2019-02-09 Thread Ximin Luo
Sune Vuorela: > [..] > > My suggestion is to not change the meaning of __FILE__ and instead fix the > programs that uses __FILE__ for something they shouldn't. > You should pass this request to the QT test maintainers. This exact issue came up in december 2017 and they were extremely rude and

Buildd-setup faffing around with __FILE__ breaks my unit tests.

2019-02-09 Thread Sune Vuorela
(Please keep me CC'ed. Not subscribed) The latest incarnations of the reproducible build autobuilder setup passes some options to gcc to not let __FILE__ actualy be the full file path, but some relative path. This breaks at least some of my unit tests. In this case, it is src:kookbook, but th