New command line switch - test licensed
New command line switch - test licensed
Please can you guys add a new command line switch (and support in the build tasks) for testing whether ncover/ncoverexplorer is licensed on the machine it's running on? I can then easily set up my build scripts to skip running coverage if the license check fails.
This would be useful for us because we only bought a license for the CI server, not individual developers ( :-( ).
Or, maybe I just don't know how to get msbuild to recognise the "unlicensed" error code as non-fatal. That's equally likely, actually...
RE: New command line switch - test licensed
I'm glad you included that last line. Could you explain a little more about your situation and why you want a switch that tests whether NCover is licensed on a machine? thanks.
RE: New command line switch - test licensed
I've got a build script that goes end-to-end, and I've got ncover in source-control for xcopy 1st-checkout ease. This means ncover binaries end up whereever check-outs do (and if this is against the EULA, I shall obviously change this setup). Then, when a developer runs the end-to-end build, I'd like ncover to simply skip running - since we only have a single license, for our CI server, which is the machine the profiling happens on and reports are generated on.
I guess I could just create another build target, that does end-to-end minus coverage (since the CI server does that part anyhow).
RE: New command line switch - test licensed
Creating a separate build target is probably the best option here. We are looking at differentiating the error codes NCover returns, and if we do you could also check the returned error code for the one that means "no license available"
RE: New command line switch - test licensed
I am in the situation and would like a way to switch or maybe just have NCover exec the child process without coverage if there is no license instead of failing.
FWIW My workaround: I current have two separate tasks and I select between them depending on whether a flag /p:WithCoverage=true is set in a local.properties file.
Kevin
RE: New command line switch - test licensed
Just in case it's useful, what I ended up doing (apart from converting my build script to use ruby rake instead of XML-hell...) was set up quite granular build targets, where the ncover one (for example) depends on the CI agent having a property set (which will only be the case, albeit manually, when the ncover license has been installed on the box that CI agent runs on).
So one agent has ncover installed on it; two have SQL server (one of those being the ncover one), and the remaining free-with-TeamCity-Pro agent can only compile stuff and run non-DB tests. So far this works ok.