Re: GDB version as convenience variable

Simon Marchi
2019-03-30T17:25:05Z

On 2019-03-27 8:56 a.m., Joel Brobecker wrote:
>>> This is going to be one more manual test to do after each branch,
>>> and I'm a bit concerned about that. We can start with that, as we want
>>> the test to pass. But I'm wondering if, instead of getting the output
>>> from "show version" to determine the expected values, we could parse
>>> gdb/version.in instead. If needed, we could so the parsing as part of
>>> the build process (ig do it in the makefile, and store the result in
>>> a couple of files). Something like that.
>>
>> Yes, if version.in is updated by some automated method, the same
>> method could update the test suite.
>
> We're actually thinking of getting rid of that daily bump, and doing
> this would make it more difficult. There has to be a way to parse
> version.in during the build and make that information available to
> the testsuite, somehow. If not, I'd rather adjust the testing to
> allow regexps, and just verify that it prints a positive number for
> the major version, and a non-zero number for the minor version.
>

I wrote a patch to make the test read the version number from version.in
directly, see here:

https://sourceware.org/ml/gdb-patches/2019-03/msg00762.html

Simon