[PATCH] gdb/testsuite: add template for test cases

Simon Marchi simark@simark.ca
Mon Nov 23 03:06:11 GMT 2020


On 2020-10-18 6:07 a.m., Joel Brobecker wrote:
>> The wiki contains a template for new test cases:
>>
>>     https://sourceware.org/gdb/wiki/GDBTestcaseCookbook#Building_the_Example_Program
>>
>> ... which is helpful, because even after many years I can't write all
>> the boilerplate for writing a test case without doing some mistakes.
>>
>> However, I think it would be nice to have it in the tree.  It's much
>> faster to cp the files than going to the wiki and copy/pasting the
>> contents.
>>
>> As a bonus, the copyright years will get updated in these files, unlike
>> those in the wiki.  So they will always be good when we start a new
>> test.
>>
>> If this patch is merged, I plan to change the wiki to just point to
>> these files.
>>
>> gdb/testsuite/ChangeLog:
>>
>> 	* gdb.base/template.exp: New.
>> 	* gdb.base/template.c: New.
>
> Good idea, Simon.

I just pushed this.

Simon


More information about the Gdb-patches mailing list