Here's the problem:
I have a few executables in the current directory, which are tests.
When I type "make check", I'd like them all to run -- even if some
fail, I'd like the others to run. And I'd like to collect some status
while they run, which gets reported after the last one finishes.
Here's how I've solved this:
TESTS := foo bar baz
check: $(TESTS)
@failed_tests=;
\
for t in $(TESTS);
\
do
\
echo -n $$t ...;
\
./$$t || failed_tests="$$failed_tests $$t";
\
done;
\
test -z "$$failed_tests" || { echo Failed tests: $$failed_tests;
false ; }
.PHONY: check
This works fine, but it's ... shall we say ... a tad ugly. (And it
probably subtly depends on features of the shell I happen to be
using.) Is there a cleaner way to do this?
--
... users want control ... [Microsoft's Internet] Explorer
wants them to sit still and shut up.
-- Verlyn Klinkenborg
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make