6 messages in com.perforce.jamming[jamming] Unit tests
FromSent OnAttachments
Wallace, Richard07 Jan 2004 12:58 
Paul Forgey07 Jan 2004 17:51 
David Abrahams07 Jan 2004 19:06 
Wallace, Richard08 Jan 2004 13:21 
Alan Baljeu" <alanb@cornerstonemold.com (Alan Baljeu)08 Jan 2004 14:03 
Wallace, Richard08 Jan 2004 14:25 
Subject:[jamming] Unit tests
From:Wallace, Richard (Rich@specastro.com)
Date:01/08/2004 02:25:16 PM
List:com.perforce.jamming

Ah, and make the action run with the 'quietly' modifier. Good idea!

Ok, now for what will hopefully be the last question: When a test fails and a
non-zero result is returned, jam dumps the commands that were executed. So, I
wind up with output like:

echo RunTest SomeTest ./SomeTest && touch ./SomeTest.done

along with the messages SomeTest printed to stdout and stderr. Is there a way
to suppress this command dump?

Thanks for all the great input! Rich

-----Original Message----- From: Alan Baljeu [mailto:ala@cornerstonemold.com] Sent: Thursday, January 08, 2004 3:04 PM To: jamm@perforce.com Subject: Re: [jamming] Unit tests

Make SomeTest a parameter, not the target, of the RunTest action. Put an echo at the beginning of the action to tell what test you are running.

----- Original Message ----- From: "Wallace, Richard" <Rich@specastro.com> To: <jamm@perforce.com> Sent: Thursday, January 08, 2004 4:21 PM Subject: RE: [jamming] Unit tests

I took the dependency to first out and made some other

modifications. Now I only have the tests being built, linked and run when 'jam test' is run. I copy and pasted the Main, MainFromObjects and Objects rules to with TestMain, etc. and changed any 'Depends x ;' lines to 'Depends testx ;' to make dependencies work out.

I only have one issue left. When the RunTest action fails

it removes the target, which is the executable. I originally had the target being some output file, but it was decided that all output should go to the console. So, rather than have jam display

RunTest SomeTest.out

I made the target the exe so it displays

RunTest SomeTest

Like I said, the problem is that if SomeTest returns a

non-zero exit code (indicating execution failed), jam removes the executable. Is there a way to side step this? I'd like to have jam display 'RunTest SomeTest' for consistency but if I must do it the other way I can. Can I somehow make the target SomeTest.out and still have jam display 'RunTest SomeTest'? Is there a way to turn off this behaviour temporarily?

Rich