GNU bug report logs - #9242
distcheck fails when having TEST in sub-directory

Previous Next

Package: automake;

Reported by: Peter Johansson <trojkan <at> gmail.com>

Date: Thu, 4 Aug 2011 17:55:02 UTC

Severity: normal

Tags: notabug

Done: Stefano Lattarini <stefano.lattarini <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 9242 in the body.
You can then email your comments to 9242 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-automake <at> gnu.org:
bug#9242; Package automake. (Thu, 04 Aug 2011 17:55:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Peter Johansson <trojkan <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-automake <at> gnu.org. (Thu, 04 Aug 2011 17:55:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Peter Johansson <trojkan <at> gmail.com>
To: bug-automake <at> gnu.org
Subject: distcheck fails when having TEST in sub-directory
Date: Thu, 4 Aug 2011 13:53:37 -0400
[Message part 1 (text/plain, inline)]
Hello automakers,

I have a non-recursive Makefile.am but keep the tests in sub-directory named
test. Surprisingly distcheck fails for me with this set up, which to me
seems to be caused by some VPATH issue.

Below is a trimmed down test case that fails for me with

make  check-TESTS
make[2]: *** No rule to make target `test/foo.test', needed by
`check-TESTS'.  Stop.
make[1]: *** [check-am] Error 2
make: *** [distcheck] Error 1


cat > configure.ac <<EOF
AC_INIT([foo], [1])
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
EOF

cat > Makefile.am <<EOF
TEST_EXTENSIONS = .test
TESTS = test/foo.test
EOF

mkdir -p test
cat > test/foo.test <<EOF
echo hello world
exit 0
EOF
chmod 755 test/foo.test

autoreconf -ivf
./configure
make all
make check
make distcheck

Is this a bug or am I doing something wrong?

I'm using Automake 1.11.1

Thanks,
Peter
[Message part 2 (text/html, inline)]

Information forwarded to owner <at> debbugs.gnu.org, bug-automake <at> gnu.org:
bug#9242; Package automake. (Fri, 05 Aug 2011 10:24:02 GMT) Full text and rfc822 format available.

Message #8 received at 9242 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Peter Johansson <trojkan <at> gmail.com>
Cc: 9242 <at> debbugs.gnu.org
Subject: Re: bug#9242: distcheck fails when having TEST in sub-directory
Date: Fri, 5 Aug 2011 12:22:08 +0200
On Thursday 04 August 2011, Peter Johansson wrote:
> Hello automakers,
>
Hi Peter.

> I have a non-recursive Makefile.am but keep the tests in sub-directory named
> test. Surprisingly distcheck fails for me with this set up, which to me
> seems to be caused by some VPATH issue.
>
Nope, you've forgotten to tell automake to ditribute your test scripts.
See below.

> Below is a trimmed down test case that fails for me with
> 
> make  check-TESTS
> make[2]: *** No rule to make target `test/foo.test', needed by
> `check-TESTS'.  Stop.
> make[1]: *** [check-am] Error 2
> make: *** [distcheck] Error 1
> 
> 
> cat > configure.ac <<EOF
> AC_INIT([foo], [1])
> AM_INIT_AUTOMAKE([foreign])
> AC_CONFIG_FILES([Makefile])
> AC_OUTPUT
> EOF
> 
> cat > Makefile.am <<EOF
> TEST_EXTENSIONS = .test
>
JFTR: this line is useless for two orthogonal reasons:

  1. you're not using the `parallel-tests' option anywhere, thus
     $(TEST_EXTENSIONS) is never used nor considered (and many other
     nifty features are lost too IMHO);

  2. even if you add `parallel-tests' to AUTOMAKE_OPTIONS, `.test'
     is in the default value of $(TEST_EXTENSIONS) anyway, so there
     is no need to add it explicitly (note that adding it is not
     wrong, only redundant).

> TESTS = test/foo.test
> EOF
> 
You've forgotten to add $(TESTS) to $(EXTRA_DIST) here:

  EXTRA_DIST = $(TESTS)

If you add the above line to your Makefile.am (both the reduced one
and the original one), does you problem disappear?  If yes, I'll
close this bug report.

> mkdir -p test
> cat > test/foo.test <<EOF
> echo hello world
> exit 0
> EOF
> chmod 755 test/foo.test
> 
> autoreconf -ivf
> ./configure
> make all
> make check
> make distcheck
> 
> Is this a bug or am I doing something wrong?
> 
> I'm using Automake 1.11.1
> 
> Thanks,
> Peter
> 

HTH,
  Stefano




Added tag(s) notabug. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 16 Aug 2011 17:00:02 GMT) Full text and rfc822 format available.

Reply sent to Stefano Lattarini <stefano.lattarini <at> gmail.com>:
You have taken responsibility. (Tue, 16 Aug 2011 17:01:02 GMT) Full text and rfc822 format available.

Notification sent to Peter Johansson <trojkan <at> gmail.com>:
bug acknowledged by developer. (Tue, 16 Aug 2011 17:01:02 GMT) Full text and rfc822 format available.

Message #15 received at 9242-done <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Peter Johansson <trojkan <at> gmail.com>
Cc: 9242-done <at> debbugs.gnu.org
Subject: Re: bug#9242: distcheck fails when having TEST in sub-directory
Date: Tue, 16 Aug 2011 18:58:37 +0200
On Friday 05 August 2011, Stefano Lattarini wrote:
> On Thursday 04 August 2011, Peter Johansson wrote:
>
> > cat > Makefile.am <<EOF
> > TEST_EXTENSIONS = .test
> > TESTS = test/foo.test
> > EOF
> > 
> You've forgotten to add $(TESTS) to $(EXTRA_DIST) here:
> 
>   EXTRA_DIST = $(TESTS)
> 
> If you add the above line to your Makefile.am (both the reduced one
> and the original one), does you problem disappear?  If yes, I'll
> close this bug report.
> 
No further reply from Peter, so I assume my diagnosis was correct and
the issue has been solved.  Peter, feel free to re-open the report if
this is not the case,

Regards,
  Stefano




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 14 Sep 2011 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 279 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.