2 messages in com.perforce.jamming[jamming] Newbie Q: Automated unit test| From | Sent On | Attachments |
|---|---|---|
| Ullr...@informatik.uni-hamburg.de | 08 Mar 2000 15:13 | |
| Matt...@corp.phone.com | 09 Mar 2000 11:07 |
| Subject: | [jamming] Newbie Q: Automated unit test![]() |
|---|---|
| From: | Ullr...@informatik.uni-hamburg.de (Ullr...@informatik.uni-hamburg.de) |
| Date: | 03/08/2000 03:13:15 PM |
| List: | com.perforce.jamming |
Hi,
I'm trying to built Jam rules which ensure that a package is only build if a number of unit tests have successfully been executed. However, in my Jamfiles, the package gets build even if the unit tests fail. What needs to be changed to make the idea work ?
Thanks for any help Ulli
# Jamrules DEPENDS obj lib exe : unittest ; NOTFILE unittest ;
rule TestedLibrary { UnitTest $(<) : $(3) ;
# this rule shouldn't succeed if the UnitTest failed Library $(<) : $(>) ; }
rule UnitTest { DEPENDS unittest : $(<) ; }
actions UnitTest { $(>) # produces nonzero exit code upon failure }
# Jamfile
Main test : test.c ; TestedLibrary libmod1 : mod1.c : test ;
# Output
UnitTest libmod1
/home/koethe/C++/make/sandbox/src/mod1/test
...failed UnitTest libmod1 ... Cc /home/koethe/C++/make/sandbox/src/mod1/mod1.o Archive /home/koethe/C++/make/sandbox/src/mod1/libmod1.a (The last line shouldn't be there)
-- ________________________________________________________________ | | | Ullrich Koethe Universität Hamburg / University of Hamburg | | FB Informatik / Dept. of Computer Science | | AB Kognitive Systeme / Cognitive Systems Group | | | | Phone: +49 (0)40 42883-2573 Vogt-Koelln-Str. 30 | | Fax: +49 (0)40 42883-2572 D - 22527 Hamburg | | Email: u.ko...@computer.org Germany | | koe...@informatik.uni-hamburg.de | | WWW: http://kogs-www.informatik.uni-hamburg.de/~koethe/ | |________________________________________________________________|




