CTest should specify the exit codes
When you run CTest in a CI script, sometimes you don't want to stop the build when some test are failing. In contrast, in case of a script error or invalid parameters, normally you want to stop the build, thus a different error code should be returned. It could be that this is already implemented like this, but I could not find it specified somewhere, with the guaranty that this will also stay the same over different CTest releases.