use of hudson.matrix.MatrixRun in project hudson-2.x by hudson.
the class HudsonTestCase method assertBuildStatus.
/**
* Asserts that the outcome of the build is a specific outcome.
*/
public <R extends Run> R assertBuildStatus(Result status, R r) throws Exception {
if (status == r.getResult())
return r;
// dump the build output in failure message
String msg = "unexpected build status; build log was:\n------\n" + getLog(r) + "\n------\n";
if (r instanceof MatrixBuild) {
MatrixBuild mb = (MatrixBuild) r;
for (MatrixRun mr : mb.getRuns()) {
msg += "--- " + mr.getParent().getCombination() + " ---\n" + getLog(mr) + "\n------\n";
}
}
assertEquals(msg, status, r.getResult());
return r;
}
Aggregations