On Mon, May 25, 2020 at 4:37 PM Giuliano Belinassi
<giuliano.belina...@usp.br> wrote:
>
> Hi,
>
> On 05/22, Richard Biener wrote:
> > On Thu, May 21, 2020 at 11:00 PM Giuliano Belinassi via Gcc
> > <gcc@gcc.gnu.org> wrote:
> > >
> > > Hi, all.
> > >
> > > GCC have a extensive testsuite, that is no news at all. However they are
> > > focused on the compiler (cc1*) or in libraries, and I can't find tests
> > > related to the GCC driver.
> > >
> > > Are there tests to the GCC driver? If yes, is there any docs about how
> > > to write them?
> >
> > I think all tests to the driver eventually exercise a compiler in the end.
> > One obvious I can find is gcc.dg/driver-specs.c which tests
> > -specs=not-a-file properly diagnoses the missing file.
>
> Yes, but that does not cover all driver features.
>
> >
> > So the question back would be what kind of "driver" tests do you have?
> > That is, what makes them not, for example, "C compiler driven by driver" 
> > tests?
>
> GCC driver supports several modes which are required for bootstrapping
> but there is no quick automated test for it. For instance.
>
> gcc a.c b.o -o a.out
> gcc a.c b.c
> gcc a.S
>
> and so on. So if you do some radical change to the GCC driver, making
> sure everything is correct get somewhat painful because you have to do
> a clean bootstrap and find out what is going wrong. If we had a
> dedicated testsuite for that, bootstrap could be avoided for
> development and only done at a last time, reducing development time.

Hmm, indeed.  I don't think we have specific tests for all variants above.
Most of them get exercised one way or another of course but the testsuite
usually separates the compile and link steps.

I would think writing a dedicated dejagnu .exp file would be possible here,
sth in a new gcc.dg/driver/, have a driver.exp driving things and using
test files in that directory.  Sharing stuff from testsuite/lib to find the
driver and figure how to invoke it, gcc-dg.exp has gcc-dg-test
which might be enough to drive things.

> Thank you,
> Giuliano.
>
> >
> > Thanks,
> > Richard.
> >
> > > Thank you,
> > > Giuliano.

Reply via email to