automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Non-recursive makefile with DejaGnu testsuite


From: Bernd Jendrissek
Subject: Re: Non-recursive makefile with DejaGnu testsuite
Date: Mon, 19 Feb 2007 16:04:44 +0200
User-agent: Mutt/1.4.2.1i

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
NotDashEscaped: You need GnuPG to verify this message

On Sat, Feb 17, 2007 at 05:45:00PM +0100, Ralf Wildenhues wrote:
> Thanks for the report and patch.  Please have patience with me, I
> don't have a lot of experience with dejagnu.

Don't worry, I'm a rank newbie at it!

> At first, I thought what you wanted could be achieved by overriding:
> 
> RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir/tests
> 
> But it seems things aren't that simple, or I made some other error
> while trying this.

I thought so too, but it seems that DejaGnu has a co-conspirator of a
bug: the --srcdir command-line argument doesn't quite override site.exp
everywhere it should.  Anyway I just think it's cleaner for automake to
feed DejaGnu the right site.exp in the first place, so that's what I
patched.

> Anyway you change needs a test to go along with it, so we ensure the
> functionality isn't broken later, and that test could also help fix my
> thinko.  Here's a proposed test to go along with your patch, adapted
> from dejagnu3.test, except that it doesn't work.  Could you (show me
> how to) fix it?  I think that will also show better what you want to
> achieve.  Thanks.

Thanks for the test; it's *almost* there, but it needs this to properly
demonstrate that my patch fixes something, going from
FAIL: dejagnu8.test
to
PASS: dejagnu8.test

diff -up automake-1.9.6/tests/dejagnu8.test.borig 
automake-1.9.6/tests/dejagnu8.test
--- automake-1.9.6/tests/dejagnu8.test.borig    2007-02-19 09:55:55.000000000 
+0200
+++ automake-1.9.6/tests/dejagnu8.test  2007-02-19 14:51:12.000000000 +0200
@@ -62,7 +62,8 @@ $AUTOMAKE --add-missing
 ./configure
 
 $MAKE check
-test -f tests/hammer.log
-test -f tests/hammer.sum
+test -f ./hammer.log
+test -f ./hammer.sum
+grep -q "PASS: test" ./hammer.log
 
 $MAKE distcheck

With a non-recursive make, hammer.log and hammer.sum end up in
$(top_srcdir) of course, and the grep is necessary to check that DejaGnu
actually found the test.

P.S. Here's another patchoid to fix a nonfatal error during distcheck:

--- automake-1.9.6/tests/dejagnu8.test.borig    2007-02-11 11:22:03.168311497 
+0100
+++ automake-1.9.6/tests/dejagnu8.test  2007-02-16 20:40:04.000000000 +0100
@@ -39,6 +39,6 @@
 AUTOMAKE_OPTIONS = dejagnu
 DEJATOOL = hammer
 AM_RUNTESTFLAGS = HAMMER=$(srcdir)/tests/hammer
-RUNTESTSRCDIR = tests
+RUNTESTSRCDIR = $(srcdir)/tests
 EXTRA_DIST = tests/hammer tests/hammer.test/hammer.exp
 END

Otherwise this breaks (silently!) when $(srcdir) != $(builddir):

check-DEJAGNU: site.exp
        srcdir=`$(am__cd) $(RUNTESTSRCDIR) && pwd`; export srcdir; \

-- 
Those who do not understand autoconf, are doomed to reinvent it, poorly.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFF2a5owyMv24BBd/gRAndyAJ9fU8SsvMDVTUu68zOK59Fe+setfQCgqdzD
RNyYB8NsgdkK+f36H4/sOyc=
=S2cl
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]