[ada, testsuite] gnat.dg cleanup

Rainer Orth ro@CeBiTec.Uni-Bielefeld.DE
Mon Jan 10 16:54:00 GMT 2011


Arnaud Charlet <charlet@adacore.com> writes:

>> It's not: separate dirs are only used when when running the same tool
>> (gnat in this case) in parallel on separate distinct parts of the
>> testsuite.  I don't yet know how hard it would be to coerce DejaGnu to
>> do this.  As an alternative, is it possible to detect the list of
>> additional packages used by the package under test?  If so, this
>> information could easily be used for automatic cleanup.
>
> You could probably use 'gnatclean -q <mainfile>' which would basically know
> what files to clean up (at least for .o and .ali files), except that

Fine, will give it a try.

> fundamentally, if you're running all the tests under the same directory, you
> may end up with race conditions if e.g. two tests use the same 'support'
> package/file, and gnatclean is deleting the compilation artefacts of this
> support package, while another gnatmake/test tries to use/reuse it.

That shouldn't be a problem: the tests are run sequentially inside a
single directory.  This might be an issue with the support files used by
ACATS, which in the current structure live in the support subdirectory,
while as I envision gnat.acats right now, all would live inside the flat
gnat directory used to run ACATS.  But I'll cross that bridge when I get
there.

> I don't know if some tests are in this category today, although again,
> with the current infrastructure, there's no way to prevent that.
> If we don't have this conflict today, I guess we could try to enforce
> this implicit rule, although being able to have tests filed and run under
> separate directories would make things much easier in the medium term.

On the source side, we can already do this today, i.e. create
subdirectories under gcc/testsuite/gnat.dg as needed and store files
there.  There's no need to have separate .exp files to have those tests
run.  They would still be built an run inside the same flat
gcc/testsuite/gnat directory as today.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University



More information about the Gcc-patches mailing list