@Test public void errorLineShouldReturnErrorElement() { Element e = builder.getElementFromLine(ERROR_LINE); assertMessageAtLevel(ERROR_LINE, e, "error"); }
public Element getElementFromLine(String line) { if (hitBuildFailedMessage) { return messageAtLevel(line, "error"); } Element e = messageAtLevelIfContains(line, "warn", " warning: "); if (e != null) { return e; } e = messageAtLevelIfContains(line, "error", " error: "); if (e != null) { return e; } e = messageAtLevelIfContains(line, "error", "** BUILD FAILED **"); if (e != null) { hitBuildFailedMessage = true; return e; } return null; }
XcodeBuilder extends Builder implements Script { public Element getElementFromLine(String line) { if (hitBuildFailedMessage) { return messageAtLevel(line, "error"); } Element e = messageAtLevelIfContains(line, "warn", " warning: "); if (e != null) { return e; } e = messageAtLevelIfContains(line, "error", " error: "); if (e != null) { return e; } e = messageAtLevelIfContains(line, "error", "** BUILD FAILED **"); if (e != null) { hitBuildFailedMessage = true; return e; } return null; } }
XcodeBuilder extends Builder implements Script { public Element getElementFromLine(String line) { if (hitBuildFailedMessage) { return messageAtLevel(line, "error"); } Element e = messageAtLevelIfContains(line, "warn", " warning: "); if (e != null) { return e; } e = messageAtLevelIfContains(line, "error", " error: "); if (e != null) { return e; } e = messageAtLevelIfContains(line, "error", "** BUILD FAILED **"); if (e != null) { hitBuildFailedMessage = true; return e; } return null; }  }
XcodeBuilder extends Builder implements Script { public Element getElementFromLine(String line) { if (hitBuildFailedMessage) { return messageAtLevel(line, "error"); } Element e = messageAtLevelIfContains(line, "warn", " warning: "); if (e != null) { return e; } e = messageAtLevelIfContains(line, "error", " error: "); if (e != null) { return e; } e = messageAtLevelIfContains(line, "error", "** BUILD FAILED **"); if (e != null) { hitBuildFailedMessage = true; return e; } return null; }  @Override Element build(Map<String, String> properties, Progress progressIn); @Override Element buildWithTarget(Map<String, String> properties, String target, Progress progress); @Override void validate(); Commandline buildCommandline(); int getExitCode(); void setExitCode(int result); void setDirectory(String path); Element getElementFromLine(String line); void setTimeout(long timeout); @Description("Pass specified argument to xcodebuild. The element has the required attribute: value.") Arg createArg(); }
XcodeBuilder extends Builder implements Script { public Element getElementFromLine(String line) { if (hitBuildFailedMessage) { return messageAtLevel(line, "error"); } Element e = messageAtLevelIfContains(line, "warn", " warning: "); if (e != null) { return e; } e = messageAtLevelIfContains(line, "error", " error: "); if (e != null) { return e; } e = messageAtLevelIfContains(line, "error", "** BUILD FAILED **"); if (e != null) { hitBuildFailedMessage = true; return e; } return null; }  @Override Element build(Map<String, String> properties, Progress progressIn); @Override Element buildWithTarget(Map<String, String> properties, String target, Progress progress); @Override void validate(); Commandline buildCommandline(); int getExitCode(); void setExitCode(int result); void setDirectory(String path); Element getElementFromLine(String line); void setTimeout(long timeout); @Description("Pass specified argument to xcodebuild. The element has the required attribute: value.") Arg createArg();  }