|
|
|
@ -99,7 +99,8 @@ fn result_to_comment(result: &BuildResult) -> String {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
reply.push(format!(
|
|
|
|
|
"{} on {}{}",
|
|
|
|
|
"<!--REQUEST_ID={}-->{} on {}{}",
|
|
|
|
|
result.request_id,
|
|
|
|
|
(match *status {
|
|
|
|
|
BuildStatus::Skipped => "No attempt".into(),
|
|
|
|
|
BuildStatus::Success => "Success".into(),
|
|
|
|
@ -195,7 +196,7 @@ mod tests {
|
|
|
|
|
"/nix/store/pcja75y9isdvgz5i00pkrpif9rxzxc29-gdb-8.1".to_owned(),
|
|
|
|
|
],
|
|
|
|
|
attempt_id: "neatattemptid".to_owned(),
|
|
|
|
|
request_id: Some("bogus-request-id".to_owned()),
|
|
|
|
|
request_id: "bogus-request-id".to_owned(),
|
|
|
|
|
system: "x86_64-linux".to_owned(),
|
|
|
|
|
attempted_attrs: Some(vec!["foo".to_owned()]),
|
|
|
|
|
skipped_attrs: Some(vec!["bar".to_owned()]),
|
|
|
|
@ -205,7 +206,7 @@ mod tests {
|
|
|
|
|
|
|
|
|
|
assert_eq!(
|
|
|
|
|
&result_to_comment(&result),
|
|
|
|
|
"Success on x86_64-linux [(full log)](https://logs.nix.ci/?key=nixos/nixpkgs.2345&attempt_id=neatattemptid)
|
|
|
|
|
"<!--REQUEST_ID=bogus-request-id-->Success on x86_64-linux [(full log)](https://logs.nix.ci/?key=nixos/nixpkgs.2345&attempt_id=neatattemptid)
|
|
|
|
|
|
|
|
|
|
Attempted: foo
|
|
|
|
|
|
|
|
|
@ -258,7 +259,7 @@ patching script interpreter paths in /nix/store/pcja75y9isdvgz5i00pkrpif9rxzxc29
|
|
|
|
|
"/nix/store/pcja75y9isdvgz5i00pkrpif9rxzxc29-gdb-8.1".to_owned(),
|
|
|
|
|
],
|
|
|
|
|
attempt_id: "neatattemptid".to_owned(),
|
|
|
|
|
request_id: Some("bogus-request-id".to_owned()),
|
|
|
|
|
request_id: "bogus-request-id".to_owned(),
|
|
|
|
|
system: "x86_64-linux".to_owned(),
|
|
|
|
|
attempted_attrs: Some(vec!["foo".to_owned()]),
|
|
|
|
|
skipped_attrs: None,
|
|
|
|
@ -268,7 +269,7 @@ patching script interpreter paths in /nix/store/pcja75y9isdvgz5i00pkrpif9rxzxc29
|
|
|
|
|
|
|
|
|
|
assert_eq!(
|
|
|
|
|
&result_to_comment(&result),
|
|
|
|
|
"Failure on x86_64-linux [(full log)](https://logs.nix.ci/?key=nixos/nixpkgs.2345&attempt_id=neatattemptid)
|
|
|
|
|
"<!--REQUEST_ID=bogus-request-id-->Failure on x86_64-linux [(full log)](https://logs.nix.ci/?key=nixos/nixpkgs.2345&attempt_id=neatattemptid)
|
|
|
|
|
|
|
|
|
|
Attempted: foo
|
|
|
|
|
|
|
|
|
@ -318,7 +319,7 @@ patching script interpreter paths in /nix/store/pcja75y9isdvgz5i00pkrpif9rxzxc29
|
|
|
|
|
"error: build of '/nix/store/l1limh50lx2cx45yb2gqpv7k8xl1mik2-gdb-8.1.drv' failed".to_owned(),
|
|
|
|
|
],
|
|
|
|
|
attempt_id: "neatattemptid".to_owned(),
|
|
|
|
|
request_id: Some("bogus-request-id".to_owned()),
|
|
|
|
|
request_id: "bogus-request-id".to_owned(),
|
|
|
|
|
system: "x86_64-linux".to_owned(),
|
|
|
|
|
attempted_attrs: Some(vec!["foo".to_owned()]),
|
|
|
|
|
skipped_attrs: None,
|
|
|
|
@ -328,7 +329,7 @@ patching script interpreter paths in /nix/store/pcja75y9isdvgz5i00pkrpif9rxzxc29
|
|
|
|
|
|
|
|
|
|
assert_eq!(
|
|
|
|
|
&result_to_comment(&result),
|
|
|
|
|
"Timed out, unknown build status on x86_64-linux [(full log)](https://logs.nix.ci/?key=nixos/nixpkgs.2345&attempt_id=neatattemptid)
|
|
|
|
|
"<!--REQUEST_ID=bogus-request-id-->Timed out, unknown build status on x86_64-linux [(full log)](https://logs.nix.ci/?key=nixos/nixpkgs.2345&attempt_id=neatattemptid)
|
|
|
|
|
|
|
|
|
|
Attempted: foo
|
|
|
|
|
|
|
|
|
@ -378,7 +379,7 @@ error: build of '/nix/store/l1limh50lx2cx45yb2gqpv7k8xl1mik2-gdb-8.1.drv' failed
|
|
|
|
|
"/nix/store/pcja75y9isdvgz5i00pkrpif9rxzxc29-gdb-8.1".to_owned(),
|
|
|
|
|
],
|
|
|
|
|
attempt_id: "neatattemptid".to_owned(),
|
|
|
|
|
request_id: Some("bogus-request-id".to_owned()),
|
|
|
|
|
request_id: "bogus-request-id".to_owned(),
|
|
|
|
|
system: "x86_64-linux".to_owned(),
|
|
|
|
|
attempted_attrs: None,
|
|
|
|
|
skipped_attrs: None,
|
|
|
|
@ -388,7 +389,7 @@ error: build of '/nix/store/l1limh50lx2cx45yb2gqpv7k8xl1mik2-gdb-8.1.drv' failed
|
|
|
|
|
|
|
|
|
|
assert_eq!(
|
|
|
|
|
&result_to_comment(&result),
|
|
|
|
|
"Success on x86_64-linux [(full log)](https://logs.nix.ci/?key=nixos/nixpkgs.2345&attempt_id=neatattemptid)
|
|
|
|
|
"<!--REQUEST_ID=bogus-request-id-->Success on x86_64-linux [(full log)](https://logs.nix.ci/?key=nixos/nixpkgs.2345&attempt_id=neatattemptid)
|
|
|
|
|
|
|
|
|
|
<details><summary>Partial log (click to expand)</summary><p>
|
|
|
|
|
|
|
|
|
@ -437,7 +438,7 @@ patching script interpreter paths in /nix/store/pcja75y9isdvgz5i00pkrpif9rxzxc29
|
|
|
|
|
"/nix/store/pcja75y9isdvgz5i00pkrpif9rxzxc29-gdb-8.1".to_owned(),
|
|
|
|
|
],
|
|
|
|
|
attempt_id: "neatattemptid".to_owned(),
|
|
|
|
|
request_id: Some("bogus-request-id".to_owned()),
|
|
|
|
|
request_id: "bogus-request-id".to_owned(),
|
|
|
|
|
system: "x86_64-linux".to_owned(),
|
|
|
|
|
attempted_attrs: None,
|
|
|
|
|
skipped_attrs: None,
|
|
|
|
@ -447,7 +448,7 @@ patching script interpreter paths in /nix/store/pcja75y9isdvgz5i00pkrpif9rxzxc29
|
|
|
|
|
|
|
|
|
|
assert_eq!(
|
|
|
|
|
&result_to_comment(&result),
|
|
|
|
|
"Failure on x86_64-linux [(full log)](https://logs.nix.ci/?key=nixos/nixpkgs.2345&attempt_id=neatattemptid)
|
|
|
|
|
"<!--REQUEST_ID=bogus-request-id-->Failure on x86_64-linux [(full log)](https://logs.nix.ci/?key=nixos/nixpkgs.2345&attempt_id=neatattemptid)
|
|
|
|
|
|
|
|
|
|
<details><summary>Partial log (click to expand)</summary><p>
|
|
|
|
|
|
|
|
|
@ -485,7 +486,7 @@ patching script interpreter paths in /nix/store/pcja75y9isdvgz5i00pkrpif9rxzxc29
|
|
|
|
|
},
|
|
|
|
|
output: vec!["foo".to_owned()],
|
|
|
|
|
attempt_id: "foo".to_owned(),
|
|
|
|
|
request_id: Some("bogus-request-id".to_owned()),
|
|
|
|
|
request_id: "bogus-request-id".to_owned(),
|
|
|
|
|
system: "x86_64-linux".to_owned(),
|
|
|
|
|
attempted_attrs: None,
|
|
|
|
|
skipped_attrs: Some(vec!["not-attempted".to_owned()]),
|
|
|
|
@ -495,7 +496,7 @@ patching script interpreter paths in /nix/store/pcja75y9isdvgz5i00pkrpif9rxzxc29
|
|
|
|
|
|
|
|
|
|
assert_eq!(
|
|
|
|
|
&result_to_comment(&result),
|
|
|
|
|
"No attempt on x86_64-linux [(full log)](https://logs.nix.ci/?key=nixos/nixpkgs.2345&attempt_id=foo)
|
|
|
|
|
"<!--REQUEST_ID=bogus-request-id-->No attempt on x86_64-linux [(full log)](https://logs.nix.ci/?key=nixos/nixpkgs.2345&attempt_id=foo)
|
|
|
|
|
|
|
|
|
|
The following builds were skipped because they don't evaluate on x86_64-linux: not-attempted
|
|
|
|
|
|
|
|
|
@ -526,7 +527,7 @@ foo
|
|
|
|
|
},
|
|
|
|
|
output: vec![],
|
|
|
|
|
attempt_id: "foo".to_owned(),
|
|
|
|
|
request_id: Some("bogus-request-id".to_owned()),
|
|
|
|
|
request_id: "bogus-request-id".to_owned(),
|
|
|
|
|
system: "x86_64-linux".to_owned(),
|
|
|
|
|
attempted_attrs: None,
|
|
|
|
|
skipped_attrs: Some(vec!["not-attempted".to_owned()]),
|
|
|
|
@ -536,7 +537,7 @@ foo
|
|
|
|
|
|
|
|
|
|
assert_eq!(
|
|
|
|
|
&result_to_comment(&result),
|
|
|
|
|
"No attempt on x86_64-linux
|
|
|
|
|
"<!--REQUEST_ID=bogus-request-id-->No attempt on x86_64-linux
|
|
|
|
|
|
|
|
|
|
The following builds were skipped because they don't evaluate on x86_64-linux: not-attempted
|
|
|
|
|
|
|
|
|
@ -572,7 +573,7 @@ No partial log is available.
|
|
|
|
|
"/nix/store/pcja75y9isdvgz5i00pkrpif9rxzxc29-gdb-8.1".to_owned(),
|
|
|
|
|
],
|
|
|
|
|
attempt_id: "neatattemptid".to_owned(),
|
|
|
|
|
request_id: Some("bogus-request-id".to_owned()),
|
|
|
|
|
request_id: "bogus-request-id".to_owned(),
|
|
|
|
|
system: "x86_64-linux".to_owned(),
|
|
|
|
|
attempted_attrs: Some(vec!["foo".to_owned()]),
|
|
|
|
|
skipped_attrs: Some(vec!["bar".to_owned()]),
|
|
|
|
@ -582,7 +583,7 @@ No partial log is available.
|
|
|
|
|
|
|
|
|
|
assert_eq!(
|
|
|
|
|
&result_to_comment(&result),
|
|
|
|
|
"Success on x86_64-linux [(full log)](https://logs.nix.ci/?key=nixos/nixpkgs.2345&attempt_id=neatattemptid)
|
|
|
|
|
"<!--REQUEST_ID=bogus-request-id-->Success on x86_64-linux [(full log)](https://logs.nix.ci/?key=nixos/nixpkgs.2345&attempt_id=neatattemptid)
|
|
|
|
|
|
|
|
|
|
Attempted: foo
|
|
|
|
|
|
|
|
|
|