Merge pull request #132 from NixOS/clarify-partial-log
Clarify partial log
This commit is contained in:
commit
b46eea0b50
|
@ -291,6 +291,15 @@ mod tests {
|
||||||
Fail,
|
Fail,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn lines_from_file(file: File) -> Vec<String> {
|
||||||
|
BufReader::new(file)
|
||||||
|
.lines()
|
||||||
|
.into_iter()
|
||||||
|
.filter(|line| line.is_ok())
|
||||||
|
.map(|line| line.unwrap())
|
||||||
|
.collect()
|
||||||
|
}
|
||||||
|
|
||||||
fn assert_run(res: Result<File, File>, expected: Expect, require: Vec<&str>) {
|
fn assert_run(res: Result<File, File>, expected: Expect, require: Vec<&str>) {
|
||||||
let expectation_held: bool = match expected {
|
let expectation_held: bool = match expected {
|
||||||
Expect::Pass => res.is_ok(),
|
Expect::Pass => res.is_ok(),
|
||||||
|
@ -302,12 +311,7 @@ mod tests {
|
||||||
Err(file) => file,
|
Err(file) => file,
|
||||||
};
|
};
|
||||||
|
|
||||||
let lines: Vec<String> = BufReader::new(file)
|
let lines = lines_from_file(file);
|
||||||
.lines()
|
|
||||||
.into_iter()
|
|
||||||
.filter(|line| line.is_ok())
|
|
||||||
.map(|line| line.unwrap())
|
|
||||||
.collect();
|
|
||||||
|
|
||||||
let buildlog = lines
|
let buildlog = lines
|
||||||
.into_iter()
|
.into_iter()
|
||||||
|
|
|
@ -113,7 +113,7 @@ fn result_to_comment(result: &BuildResult) -> String {
|
||||||
if result.output.len() > 0 {
|
if result.output.len() > 0 {
|
||||||
reply.extend(partial_log_segment(&result.output));
|
reply.extend(partial_log_segment(&result.output));
|
||||||
} else {
|
} else {
|
||||||
reply.push("No log is available.".to_owned());
|
reply.push("No partial log is available.".to_owned());
|
||||||
reply.push("".to_owned());
|
reply.push("".to_owned());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -416,7 +416,7 @@ patching script interpreter paths in /nix/store/pcja75y9isdvgz5i00pkrpif9rxzxc29
|
||||||
|
|
||||||
The following builds were skipped because they don't evaluate on x86_64-linux: not-attempted
|
The following builds were skipped because they don't evaluate on x86_64-linux: not-attempted
|
||||||
|
|
||||||
No log is available.
|
No partial log is available.
|
||||||
"
|
"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue