|
Howdy all,
I was going along as happy as a pig in slop when I realized I might be needing to do a rollback if the entire build was not successful. If the entire build, including all NUnit tests, is not successful then what do I do? Do I want the assemblies that did build and pass tests correctly installed while skipping the installation of the ones that failed? Or do I want to not install anything unless it all builds and passes all unit tests?
The way I’ve got it set up now, the build file for each assembly does the building, testing, and installation** of each assembly in turn. That means if the first two build OK and the third one fails then I’m stuck with a configuration that might not work. I tried mixing up the use of the properties nant.onsuccess and nant.onfail in the individual assembly build files but couldn’t figure out a way to make things work.
One thing that’s not working is the trickle down of failures to the main build file. Even though some of the NUnit tests are failing, the overall build is a success. I even tried to use the <fail/> task but that didn’t effect the output status of the build file. (The <fail/> task doesn’t seem to effect the route through the onsuccess/onfail tasks either.)
**In this case, “Installation” means either install in the GAC or copy to a folder where the localhost web server and other projects expect to find the DLLs. The structure I’m using is outlined in “What I’ve got now” below.
+++ What I’ve got now +++ This is the directory structure: Main - branch 1 - assembly 1 - assembly 1 unit tests - assembly 2 - assembly 3 unit tests - branch 2 - assembly 3 - assembly 3 unit tests
A main build file and build property file in the main folder. - This build file calls the assembly build files A branch properties file in each branch (Which includes the Main properties file) An assembly build file and build property file in each assembly folder - The build file includes its own property file and the property file includes the branch property file. - Assembly build files call the unit test build files A unit test build file and build property file in each unit test folder. - The build file includes its own property file and the property file includes the branch property file.
Thanks for the help.
MArk B.
|
[Nant-users] The failure of success, or, but I really didn't want to do that...
Butler, Mark A Mr IPI Gramm Tech Tue, 04 Jan 2005 17:08:48 -0800
Title: Message
