comp.lang.ada
 help / color / mirror / Atom feed
* Moving From AUnit V1 to V2
@ 2008-03-16  2:51 Michael Rohan
  2008-03-16 11:14 ` Peter C. Chapin
  2008-03-16 18:44 ` Simon Wright
  0 siblings, 2 replies; 9+ messages in thread
From: Michael Rohan @ 2008-03-16  2:51 UTC (permalink / raw)


Hi folks,

I have some AUnit tests using AUnit v1 which compiles OK with GCC;

gcc version 4.1.2 20070925 (Red Hat 4.1.2-27)

(Fedora Core 7).  It doesn't compile with GNAT

gcc version 4.1.3 20070403 for GNAT GPL 2007 (20070402)

so I figured I'd just move to AUnit v2 (which was available with GPL
2007).  This update from V1 to V2 changed AUnit to a generic framework
which needs to be instantiated.  Does anyone have recommendations on
the updates needed?  The docs that came with V2 probably need some
updates.

Any input would be appreciated.

Take care,
Michael.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Moving From AUnit V1 to V2
  2008-03-16  2:51 Moving From AUnit V1 to V2 Michael Rohan
@ 2008-03-16 11:14 ` Peter C. Chapin
  2008-03-16 17:07   ` Ed Falis
  2008-03-16 18:44 ` Simon Wright
  1 sibling, 1 reply; 9+ messages in thread
From: Peter C. Chapin @ 2008-03-16 11:14 UTC (permalink / raw)


Michael Rohan wrote:

> so I figured I'd just move to AUnit v2 (which was available with GPL
> 2007).  This update from V1 to V2 changed AUnit to a generic framework
> which needs to be instantiated.  Does anyone have recommendations on
> the updates needed?  The docs that came with V2 probably need some
> updates.

I moved from AUnit v1 to AUnit v2 in one of my projects but it was a 
while ago and I've forgotten exactly what was involved. I agree that the 
AUnit documentation is a bit lacking. I do remember that I ended up 
reading the AUnit source and looking at the examples to figure out what 
needed to be done.

Sorry I'm not more helpful.

Peter



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Moving From AUnit V1 to V2
  2008-03-16 11:14 ` Peter C. Chapin
@ 2008-03-16 17:07   ` Ed Falis
  2008-03-17  0:06     ` Peter C. Chapin
  0 siblings, 1 reply; 9+ messages in thread
From: Ed Falis @ 2008-03-16 17:07 UTC (permalink / raw)


On Sun, 16 Mar 2008 07:14:46 -0400, Peter C. Chapin <pchapin@sover.net>  
wrote:

> I moved from AUnit v1 to AUnit v2 in one of my projects but it was a  
> while ago and I've forgotten exactly what was involved. I agree that the  
> AUnit documentation is a bit lacking. I do remember that I ended up  
> reading the AUnit source and looking at the examples to figure out what  
> needed to be done.
>
> Sorry I'm not more helpful.

I believe aunit.html under "doc" describes the conversion process in  
detail.  At least I know I spent a lot of time writing it.  If you've read  
that document and it's still "short", let me know.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Moving From AUnit V1 to V2
  2008-03-16  2:51 Moving From AUnit V1 to V2 Michael Rohan
  2008-03-16 11:14 ` Peter C. Chapin
@ 2008-03-16 18:44 ` Simon Wright
  2008-03-16 23:41   ` Ed Falis
  1 sibling, 1 reply; 9+ messages in thread
From: Simon Wright @ 2008-03-16 18:44 UTC (permalink / raw)


I didn't have any GNAT-GPL-2007 problems with AUnit 1.05 (which came
with 2006).

I hadn't (therefore) checked out AUnit 2 - but I see that AUnit 2.01
includes notes on migrating from 1 to 2, and even a script to automate
some of the changes. Are these notes wrong?



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Moving From AUnit V1 to V2
  2008-03-16 18:44 ` Simon Wright
@ 2008-03-16 23:41   ` Ed Falis
  0 siblings, 0 replies; 9+ messages in thread
From: Ed Falis @ 2008-03-16 23:41 UTC (permalink / raw)


On Sun, 16 Mar 2008 14:44:39 -0400, Simon Wright <simon.j.wright@mac.com>  
wrote:

> I didn't have any GNAT-GPL-2007 problems with AUnit 1.05 (which came
> with 2006).
>
> I hadn't (therefore) checked out AUnit 2 - but I see that AUnit 2.01
> includes notes on migrating from 1 to 2, and even a script to automate
> some of the changes. Are these notes wrong?

Yes, AUnit 1.05 is fine for use within AUnit's original design  
parameters.  AUnit 2.xx was intended to address usage under constrained  
run-time environments, for example no exception propagation or dynamic  
allocation.  This change required a certain amount of interface change,  
though we tried to limit it insofar as possible.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Moving From AUnit V1 to V2
  2008-03-16 17:07   ` Ed Falis
@ 2008-03-17  0:06     ` Peter C. Chapin
  2008-03-17 13:35       ` Ed Falis
  2008-03-17 20:44       ` Simon Wright
  0 siblings, 2 replies; 9+ messages in thread
From: Peter C. Chapin @ 2008-03-17  0:06 UTC (permalink / raw)


Ed Falis wrote:

> I believe aunit.html under "doc" describes the conversion process in 
> detail.  At least I know I spent a lot of time writing it.  If you've 
> read that document and it's still "short", let me know.

Well there is no such file 'aunit.html' in the AUnit distribution that 
is part of GNAT GPL 2007. I do see doc/aunit/aunit.texi, but I don't 
find that file especially readable. I'm on a Windows system, but I do 
have Cygwin installed. When I execute Cygwin's make I get the following 
error:

sed: can't read ../version_information: No such file or directory
make: *** [version] Error 2

I also tried using the make that is part of GNAT GPL 2007 (together with 
whatever other Unix-like tools that are part of that package). In that 
case I get this error:

The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
'sed' is not recognized as an internal or external command,
operable program or batch file.
make: *** [version] Error 1

Peter



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Moving From AUnit V1 to V2
  2008-03-17  0:06     ` Peter C. Chapin
@ 2008-03-17 13:35       ` Ed Falis
  2008-03-17 19:24         ` Michael Rohan
  2008-03-17 20:44       ` Simon Wright
  1 sibling, 1 reply; 9+ messages in thread
From: Ed Falis @ 2008-03-17 13:35 UTC (permalink / raw)


Peter,

You're both an AdaCore regular customer and a GAP member, so should use  
AdaCore's support services.  I'll send you a private email.  For everyone  
else, if we find a packaging problem, we will correct it on the Libre site.

- Ed



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Moving From AUnit V1 to V2
  2008-03-17 13:35       ` Ed Falis
@ 2008-03-17 19:24         ` Michael Rohan
  0 siblings, 0 replies; 9+ messages in thread
From: Michael Rohan @ 2008-03-17 19:24 UTC (permalink / raw)


On Mar 17, 6:35 am, "Ed Falis" <fa...@verizon.net> wrote:
> Peter,
>
> You're both an AdaCore regular customer and a GAP member, so should use
> AdaCore's support services.  I'll send you a private email.  For everyone
> else, if we find a packaging problem, we will correct it on the Libre site.
>
> - Ed

Hi,

I received a lot of pointers from this thread and should be able to
move ahead now.  Thank you all.

My confusion was started by the example that was installed with aunit:

/usr/gnat/share/examples/aunit

Using a copy of this as a base, I ran into compilation errors which
made me feel if this is not consistent with the distribution, I might
need additional help.  After copying /usr/gnat/share/examples/aunit/*
and /usr/gnat/lib/gnat/aunit.gpr, updating sample.gpr  and aunit.gpr
to use paths based on /usr/gnat, I got

$ gnatmake -Psample.gpr
gcc -c -g -gnatQ -gnatf -g -I- -gnatA /home/mrohan/aunit/harness.adb
aunit.ads:6:04: unmatched actual "Max_Failure_Message_Size"
aunit.ads:6:04: in instantiation of "Framework" declared at
aunit_framework-framework.ads:51
pr_xxxx_xxx.ads:3:09: type must be declared abstract or "NAME"
overridden
pr_xxxx_xxx.ads:3:09: "NAME" has been inherited at line 3
pr_xxxx_xxx.ads:3:09: "NAME" has been inherited from subprogram at
aunit_framework-tests-test_cases.ads:52, instance at aunit_framework-
framework.ads:69, instance at aunit.ads:3
pr_xxxx_xxx.ads:11:53: "Test_String" not declared in "Test_Results"
gnatmake: "/home/mrohan/aunit/harness.adb" compilation error

Take care,
Michael.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Moving From AUnit V1 to V2
  2008-03-17  0:06     ` Peter C. Chapin
  2008-03-17 13:35       ` Ed Falis
@ 2008-03-17 20:44       ` Simon Wright
  1 sibling, 0 replies; 9+ messages in thread
From: Simon Wright @ 2008-03-17 20:44 UTC (permalink / raw)


"Peter C. Chapin" <pchapin@sover.net> writes:

> Well there is no such file 'aunit.html' in the AUnit distribution
> that is part of GNAT GPL 2007. I do see doc/aunit/aunit.texi, but I
> don't find that file especially readable.

I downloaded 2007 on 5 Jan, the aunit archive in it is

-r--r--r--   1 simon  simon  246411 Oct 17 11:03 aunit-gpl-2.01-1-src.tgz

and that does contain the html file.



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-03-17 20:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-16  2:51 Moving From AUnit V1 to V2 Michael Rohan
2008-03-16 11:14 ` Peter C. Chapin
2008-03-16 17:07   ` Ed Falis
2008-03-17  0:06     ` Peter C. Chapin
2008-03-17 13:35       ` Ed Falis
2008-03-17 19:24         ` Michael Rohan
2008-03-17 20:44       ` Simon Wright
2008-03-16 18:44 ` Simon Wright
2008-03-16 23:41   ` Ed Falis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox