I am running these tests within cron
Ideally, I would like cron to only send mail if any tests fail.
cron only sends mail when output is generated. What you want is that your tests be silent if everything goes ok (ie: change your print statements or redirect STDOUT) and direct error messages to STDERR. That way, you can control whether you want all the output (by not redirecting STDOUT) or only errors (ideally none -> no output -> no mail from cron).
--
David Serrano
In reply to Re: Reporting test failures within cron
by Hue-Bond
in thread Reporting test failures within cron
by tomhukins
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |