[m-dev.] for review: install all needed grades before testing

Mark Anthony BROWN dougl at cs.mu.OZ.AU
Wed Aug 23 01:25:22 AEST 2000


Fergus Henderson writes:
> On 22-Aug-2000, Mark Anthony BROWN <dougl at cs.mu.OZ.AU> wrote:
> > The nightly tests on hydra have been failing in the debugger/declarative
> > directory, with grade asm_fast.gc.prof.  The problem is that these tests
> > are linked with an older version of the browser library, since the new
> > library is not installed in that grade until after the tests are run.
> 
> That diagnosis doesn't sound right to me, because the test_mercury script
> installs the library grades *before* running the tests.

That's what is meant to happen, but the set of library grades installed
at that point doesn't include all the grades that are tested.  On hydra
asm_fast.gc.prof is not installed then, but is tested later.  (I checked
the tests log on hydra to verify this.)

> So, could you explain why you think the tests are linked with an older
> version of the browser library?
> 
I looked at the date stamp of the library which is linked:

-rwxr-xr-x    1 mercury  mercury    562352 Aug 18 07:23 /home/mercury/public/mercury-latest/i686-pc-linux-gnu/lib/mercury/lib/asm_fast.gc.prof/i686-pc-linux-gnu/libmer_browser.so*

> There is also a problem with the code in your diff:
> 
> > @@ -315,19 +363,10 @@
> >      # again, look back in the CVS archives for version 1.114 to see
> >      # the necessary code.
> >  
> > -    mmake install MMAKEFLAGS=$PARALLEL || status=1
> > +    mmake install LIBGRADES=$GRADES MMAKEFLAGS=$PARALLEL || status=1
> 
> This will install not just in $GRADES but also in the default grade.
> If the default grade is in $GRADES, as will most likely be the case,
> then it will install in the default grade twice.
> 
> Also, this change would mean that the grades that don't get tested
> (e.g. because testing them would take too long) also don't get
> installed.  I don't think that is desirable.
>

Ok, how about something like the following?  It's a bit of a double
maintenance problem, so I've added a comment.


Estimated hours taken: 1.5

tools/test_mercury:
	Install the libraries in grade asm_fast.gc.prof on hydra, before
	the tests are run in that grade.

Index: tools/test_mercury
===================================================================
RCS file: /home/mercury1/repository/mercury/tools/test_mercury,v
retrieving revision 1.116
diff -u -r1.116 test_mercury
--- tools/test_mercury	2000/08/16 08:14:58	1.116
+++ tools/test_mercury	2000/08/22 15:22:50
@@ -320,10 +320,13 @@
 	|| status=1
 
 	# If you want to add extra grades to install on specific hosts,
-	# do it here.
+	# do it here.  Any grade which is tested later, but which is not
+	# installed above, should be installed here.
     case $HOST in
     	hg)	mmake install_grades LIBGRADES="asm_fast.par.gc" || status=1
 		;;
+	hydra)	mmake install_grades LIBGRADES="asm_fast.gc.prof" || status=1
+		;;
 	*)
 		;;
     esac
@@ -430,6 +433,9 @@
 
 #MERCURY_COMPILER=$DIR/mercury/stage2/compiler/mercury_compile
 #export MERCURY_COMPILER
+
+# Any grade here that is not installed by default needs to be explicitly
+# installed above, before the tests are run.
 case $HOST in
 	mundook|murlibobo)
 		GRADES="none none.gc


Cheers,
Mark.

--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list