Subject: | Fwd: Problem in "make test" with multiple Makefile.PL's |
Date: | Wed, 21 Jun 2006 16:53:30 -0700 |
To: | bug-ExtUtils-MakeMaker [...] rt.cpan.org |
From: | "Michael G Schwern" <schwern [...] gmail.com> |
Show quoted text
---------- Forwarded message ----------
From: Paul Marquess <Paul.Marquess@btinternet.com>
Date: Jun 20, 2006 9:31 AM
Subject: Problem in "make test" with multiple Makefile.PL's
To: makemaker@perl.org
Consider a Makefile.PL like this where you want to build, test and install
the distributions alpha & beta at the same time
WriteMakefile(
NAME => "whatever",
VERSION => '1.0',
DIR => [ "alpha", "beta" ],
);
The "test" target created by that on a Unix-ish platform looks like this
test :: $(TEST_TYPE)
$(NOECHO) $(ABSPERLRUN) -e 'chdir '\''alpha'\''; ' \
-e 'system '\''$(MAKE) test $(PASTHRU)'\''' \
-e ' if -f '\''$(FIRST_MAKEFILE)'\'';'
$(NOECHO) $(ABSPERLRUN) -e 'chdir '\''beta'\''; ' \
-e 'system '\''$(MAKE) test $(PASTHRU)'\''' \
-e ' if -f '\''$(FIRST_MAKEFILE)'\'';'
The problem with that code is that if there is a failure in one of the
tests, the status will never work its way back to the shell.
A quick hack, changing
-e 'system '\''$(MAKE) test $(PASTHRU)'\''' \
to
-e '(system '\''$(MAKE) test $(PASTHRU)'\'' and exit 1 )' \
sorted the problem for me.
Paul