This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 0/N] test-suite improvement - PASS/FAIL: initial patch
On Tue, 18 Sep 2012, Siddhesh Poyarekar wrote:
> One of the things I had noted during that time was that each line of a
> recipe is invoked in a different shell, so I don't know if the return
> codes can be captured as they are being done in this patch -- I assume
> that this has been tested though. The way to work around this was to
> use the .ONESHELL target. It's not used in our makefiles currently and
> I vaguely remember Roland saying that we want to limit our usage of
> obscure make features.
You don't need an obscure make feature. Just do
test-rule.out: dependencies
test-command > test-rule.out 2>&1; \
whatever-uses-$$?
(where whatever-uses-$$? is the makefile variable with the standard logic
to convert an exit status into the PASS, FAIL, UNRESOLVED etc. test
status).
--
Joseph S. Myers
joseph@codesourcery.com