Permalink
Browse files

add CEDAR_SKIP_EXCEPTION_SYMBOLICATION

  • Loading branch information...
1 parent dfa92be commit 95ba4158a3e17bb2990eeb14dfc739a9108460d4 @cppforlife cppforlife committed Feb 17, 2013
Showing with 15 additions and 1 deletion.
  1. +6 −0 README.markdown
  2. +9 −1 Source/CDRDefaultReporter.m
View
@@ -417,6 +417,12 @@ you can take advantage of the ability to specify multiple reporters like so:
By default, the XML file will be written to `build/TEST-Cedar.xml` but this
path can be overridden with the `CEDAR_JUNIT_XML_FILE` env variable.
+### Exception Symbolication
+
+By default Cedar symbolicates exceptions that caused test failures; however,
+this feature might be turned off with `CEDAR_SKIP_EXCEPTION_SYMBOLICATION`
+since symbolicating many exceptions can become a lengthy operation.
+
## Code Snippets
@@ -101,8 +101,16 @@ - (NSString *)errorToken {
}
- (NSString *)errorMessageForExample:(CDRExample *)example {
+ NSString *callStackSymbols = nil;
+
+ // Currently to symbolicate an exception
+ // we shell out to atos; thus this opt-out setting.
+ if (!getenv("CEDAR_SKIP_EXCEPTION_SYMBOLICATION")) {
+ callStackSymbols = example.failure.callStackSymbolicatedSymbols;
+ }
+
return [NSString stringWithFormat:@"EXCEPTION %@\n%@\n%@",
- example.fullText, example.failure, example.failure.callStackSymbolicatedSymbols];
+ example.fullText, example.failure, callStackSymbols];
}
#pragma mark Private interface

0 comments on commit 95ba415

Please sign in to comment.