This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ACATS & GCC testsuite


On Wed, 2003-04-02 at 22:45, Zack Weinberg wrote:
> When developing a patch I frequently sit in a cycle like this:
> 
> <edit edit edit>
> $ make cc1
> $ make check-gcc RUNTESTFLAGS="only/the/subset/I/care/about.exp"
> FAIL: ...
> 
> <repeat>
> 
> I would not mind much if final acceptance testing for patches was done
> on an installed tree, but I'll be unhappy if you break the above.

The first part of packaging ACATS is configuring the source,
know what to tweak and remove in the mass of tests
and track updates in the suite (quite low volume anyway).

Once it is done, running the test is just compiling
support sources (all the tests are using a few
common packages), then looping over the tests
doing gnatmake, run, check for "PASSED" in output.

I'll package the ACATS sources to be suitable
for integration in CVS and provide a simple
contrib script to run and report the status
with an installed compiler.

Any testing framework should be able to pick up the thing
easily from there. As I said in a previous email, I no longer 
intent to figure out configure, Makefile & DejaGNU in build trickery, 
so if someone has the knowledge to add such a thing, please feel free to do so. 
(Plus it will have to be redone if the GCC build structure change
and / or if the Ada runtime change.)

A simple Ada test showing support precompile and then
build'n run a test:

$ gcc -c support.adb
$ gnatmake test_ada
$ ./test_ada
PASSED test_ada


$ cat support.ads
package Support is
   procedure Report (S : in String; Passed : in Boolean);
end Support;
$ cat support.adb
with Ada.Text_IO;
package body Support is
   procedure Report (S : in String; Passed : in Boolean) is
   begin
      if Passed then
         Ada.Text_IO.Put_Line ("PASSED " & S);
      else
         Ada.Text_IO.Put_Line ("FAILED " & S);
      end if;
   end Report;
end Support;
$ cat test_ada.adb
with Support;
procedure Test_Ada is
begin
   Support.Report ("test_ada", True);
end Test_Ada;
$



-- 
Laurent Guerby <guerby at acm dot org>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]