Hi,

(Please include me in any reply, I am not subscribed.)

I have one test program for each module in my library. Each writes to stdout and stderr. Since I have many tests, this generates a lot of output when I run `make check'. I would like to change `make check' so that it:

1) Causes only those tests that fail to print anything
2) Additionally lists the tests that fail at the end

I can probably do this by writing a shell script wrapper that calls make, redirects stderr, and does some processing with awk. I was wondering if some Automake wizard could hint as to how I might do it inside my Makefile.am. I think it is something generally useful for Automake users.

I did look at the check target in the generated Makefile, but I couldn't see how to wrap the check target inside my Makefile.am.

check-am: all-am
        $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
        $(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: check-am

I am using 1.9.6.

My ideal final product has these two behaviours:

$ make check
===================
All 46 tests passed
===================

$ make check
<test program stdout and stderr goes here>
FAIL: sometest
================================================
1 of 46 tests failed: sometest
Please report to chris.pickett AT mail.mcgill.ca
================================================
make[2]: *** [check-TESTS] Error 1
make[1]: *** [check-am] Error 2
make: *** [check-recursive] Error 1

Thanks,
Chris


Reply via email to