This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi guys,
As part of my CCS project I am cross-compiling a collection of tests on some of the code, and executing them on my desktop PC (this machine runs Windows).
Each test-suite compiles down to an executable file in a test-build directory. The return code of the test-runner tells whether or not all tests ran successfully (returns 0 in that case, 1 if not).
I am using a batch-file to run these test-executables one-by-one as my pre-build step, and I am opening a new window for the command-prompt (by running 'start').
I've written the batch file such that the prompt stays open on failure (i.e. if one of the test-executables return non-0), and closes immediately on success.
That annoys me enough to keep the tests up-to-date and passing. I would however like to be able to abort the build if a test fails.
I'd like CCS to stop the build IMMEDIATELY when a pre- or post-build step fails, as if CCS encountered a compilation failure. Is this possible?
I know I can delete the output files (.out) if I encounter an error, and then get a Load Error from CCS ("Cannot find XX.out") but only after it's done formatting my embedded target etc. Which means CCS ends up failing at the very LAST point in time instead of failing as soon as possible.
The option marked in this screenshot sounds like it might do the trick, but since it doesn't, I suspect it is an option given to make / gcc to make them fail on first error (like -k for make and -Wfatal-errors for gcc).
Hi,
If I understood correctly the issue at hand, you would like to halt the entire build process at the pre-build step, is that so? If so, unfortunately I couldn't find a way to get this work, and some searches around the internet didn't return anything significant. The main issue I see is the pre-build and post-build steps are completely different executables, therefore killing this process via a batch file does not kill the next one.
You could potentially try to change the Default Build Command (in the tab Builder) so you would call your own batch file that calls gmake on the output directory (either Debug, Release or whatever you chose). This way you would have complete control over the build process, but it may bring other problems such as tracking changes to source/include files.
Regards,
Rafael