[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: returning program results
From: |
Paul Smith |
Subject: |
Re: returning program results |
Date: |
Thu, 19 Feb 2009 23:55:27 -0500 |
On Thu, 2009-02-19 at 10:27 -0700, Ray dunn wrote:
> I am configuring an automated unit testing system running on WinXP. I
> use GNU Make for building and running my unit tests. Each of the (C
> ++) test programs will return a pass/fail value from main(), which
> normally can be picked up by operating system as the program return
> value.
>
> How can I gain access to this value if I run the test program from a
> makefile?
If a recipe that make invokes exits with an error code (non-0 exit),
then that rule will fail. That means make itself will exit with an
error (non-0 exit).
So, just test if the make command failed the same way you would if the
command make runs fails.
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.mad-scientist.us
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist