This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Run one gcc test case multiple times with different option sets
- From: Andrew Pinski <pinskia at gmail dot com>
- To: Bill Seurer <seurer at linux dot vnet dot ibm dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Fri, 1 Apr 2016 09:08:43 -0700
- Subject: Re: Run one gcc test case multiple times with different option sets
- Authentication-results: sourceware.org; auth=none
- References: <56FE96EF dot 6050508 at linux dot vnet dot ibm dot com> <CA+=Sn1k1fRzTRx2Ds5iu9+uNVMrO9N3NGmN4OFa3tkrnRjuECQ at mail dot gmail dot com> <56FE9B05 dot 30802 at linux dot vnet dot ibm dot com>
On Fri, Apr 1, 2016 at 9:00 AM, Bill Seurer <seurer@linux.vnet.ibm.com> wrote:
> On 04/01/16 10:48, Andrew Pinski wrote:
>>
>> On Fri, Apr 1, 2016 at 8:42 AM, Bill Seurer <seurer@linux.vnet.ibm.com>
>> wrote:
>>>
>>> Is there some way using deja-gnu to have a single test case run multiple
>>> times using different sets of compiler options? I didn't see anything in
>>> the documentation and didn't see any examples when I searched the
>>> existing
>>> test cases (though of course I wasn't exactly sure what to look for).
>>
>>
>> What most folks do is have two .c files; one that includes the other.
>
>
> So something like...
>
> #define foo
> #include "real-test-case.c"
>
> #undef foo
> #define bar
> #include "real-test-case.c"
Well more like:
New-testcase.c:
#define foo
#include "real-test-case.c"
real-testcase-case.c
#ifndef foo
#define bar
#endif
REAL TESTCASE GOES here
Thanks,
Andrew
> --
>
> -Bill Seurer
>