Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlena Laskavaia2014-12-02 22:42:49 -0500
committerElena Laskavaia2014-12-04 13:57:27 -0500
commit863def95be233a4f6650874b1c3950cad4aabb8d (patch)
tree2f768e76d7a1632654811aaca55907946819779d /codan/org.eclipse.cdt.codan.core.test
parentc6865cfb7dfaad4317abc572c3fe73ed5ff8be3a (diff)
downloadorg.eclipse.cdt-863def95be233a4f6650874b1c3950cad4aabb8d.tar.gz
org.eclipse.cdt-863def95be233a4f6650874b1c3950cad4aabb8d.tar.xz
org.eclipse.cdt-863def95be233a4f6650874b1c3950cad4aabb8d.zip
Bug 453275 - Codan tests cannot test for checkers throwing an exception
Added system flag that is used to propagate exception instead of swallowing. Set by default in codan junit tests. Change-Id: Iccda9a7b2e419192bb9f4eec4b89d525e152fc81 Signed-off-by: Alena Laskavaia <elaskavaia.cdt@gmail.com> Reviewed-on: https://git.eclipse.org/r/37482
Diffstat (limited to 'codan/org.eclipse.cdt.codan.core.test')
-rw-r--r--codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/test/CodanTestCase.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/test/CodanTestCase.java b/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/test/CodanTestCase.java
index 41af0bf470..dceab470a8 100644
--- a/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/test/CodanTestCase.java
+++ b/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/test/CodanTestCase.java
@@ -78,6 +78,8 @@ public class CodanTestCase extends BaseTestCase {
removeLeftOverProjects();
cproject = createProject(isCpp());
tmpDir = cproject.getProject().getLocation().makeAbsolute().toFile();
+ // this make CodanRunner to propagate all exceptions it normally just logs
+ System.setProperty("codan.rethrow", "true"); // test can override setUp and unset this
}
@Override

Back to the top