feat: add target triple to native smoke report
This commit is contained in:
@@ -523,6 +523,7 @@ fn render_smoke_report_json(
|
|||||||
" \"schema_version\": \"{}\",\n",
|
" \"schema_version\": \"{}\",\n",
|
||||||
" \"commit_sha\": \"{}\",\n",
|
" \"commit_sha\": \"{}\",\n",
|
||||||
" \"rust_toolchain\": \"{}\",\n",
|
" \"rust_toolchain\": \"{}\",\n",
|
||||||
|
" \"target_triple\": \"{}\",\n",
|
||||||
" \"platform\": \"{}\",\n",
|
" \"platform\": \"{}\",\n",
|
||||||
" \"status\": \"{}\",\n",
|
" \"status\": \"{}\",\n",
|
||||||
" \"frames\": {},\n",
|
" \"frames\": {},\n",
|
||||||
@@ -548,6 +549,7 @@ fn render_smoke_report_json(
|
|||||||
SCHEMA_VERSION,
|
SCHEMA_VERSION,
|
||||||
json_escape(¤t_git_commit_sha()),
|
json_escape(¤t_git_commit_sha()),
|
||||||
RUST_TOOLCHAIN,
|
RUST_TOOLCHAIN,
|
||||||
|
json_escape(¤t_rustc_host_triple()),
|
||||||
options.platform.as_str(),
|
options.platform.as_str(),
|
||||||
options.status.as_str(),
|
options.status.as_str(),
|
||||||
options.frames,
|
options.frames,
|
||||||
@@ -594,6 +596,22 @@ fn current_git_commit_sha() -> String {
|
|||||||
.unwrap_or_else(|| "unknown".to_string())
|
.unwrap_or_else(|| "unknown".to_string())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn current_rustc_host_triple() -> String {
|
||||||
|
Command::new("rustc")
|
||||||
|
.arg("-vV")
|
||||||
|
.output()
|
||||||
|
.ok()
|
||||||
|
.filter(|output| output.status.success())
|
||||||
|
.and_then(|output| String::from_utf8(output.stdout).ok())
|
||||||
|
.and_then(|output| {
|
||||||
|
output
|
||||||
|
.lines()
|
||||||
|
.find_map(|line| line.strip_prefix("host: ").map(ToString::to_string))
|
||||||
|
})
|
||||||
|
.filter(|value| !value.trim().is_empty())
|
||||||
|
.unwrap_or_else(|| "unknown".to_string())
|
||||||
|
}
|
||||||
|
|
||||||
fn json_string(value: &str) -> String {
|
fn json_string(value: &str) -> String {
|
||||||
format!("\"{}\"", json_escape(value))
|
format!("\"{}\"", json_escape(value))
|
||||||
}
|
}
|
||||||
@@ -952,6 +970,7 @@ mod tests {
|
|||||||
)?;
|
)?;
|
||||||
|
|
||||||
assert!(json.contains("\"schema_version\": \"fparkan-native-smoke-v1\""));
|
assert!(json.contains("\"schema_version\": \"fparkan-native-smoke-v1\""));
|
||||||
|
assert!(json.contains("\"target_triple\": \""));
|
||||||
assert!(json.contains("\"platform\": \"macos\""));
|
assert!(json.contains("\"platform\": \"macos\""));
|
||||||
assert!(json.contains("\"status\": \"blocked\""));
|
assert!(json.contains("\"status\": \"blocked\""));
|
||||||
assert!(json.contains("\"swapchain_recreate_count\": 0"));
|
assert!(json.contains("\"swapchain_recreate_count\": 0"));
|
||||||
@@ -1030,4 +1049,9 @@ mod tests {
|
|||||||
fn formats_vulkan_api_version() {
|
fn formats_vulkan_api_version() {
|
||||||
assert_eq!(format_api_version((1 << 22) | (3 << 12) | 280), "1.3.280");
|
assert_eq!(format_api_version((1 << 22) | (3 << 12) | 280), "1.3.280");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn reports_rustc_host_triple() {
|
||||||
|
assert!(!current_rustc_host_triple().trim().is_empty());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ S0-VK-024 covered cargo test -p fparkan-vulkan-smoke --offline rejects_passed_wi
|
|||||||
S0-VK-025 covered cargo test -p fparkan-vulkan-smoke --offline rejects_passed_without_instance_probe parses_instance_probe_as_loader_probe
|
S0-VK-025 covered cargo test -p fparkan-vulkan-smoke --offline rejects_passed_without_instance_probe parses_instance_probe_as_loader_probe
|
||||||
S0-VK-026 covered cargo test -p fparkan-vulkan-smoke --offline rejects_passed_without_window_probe rejects_passed_without_surface_probe parses_surface_probe_as_instance_probe
|
S0-VK-026 covered cargo test -p fparkan-vulkan-smoke --offline rejects_passed_without_window_probe rejects_passed_without_surface_probe parses_surface_probe_as_instance_probe
|
||||||
S0-VK-027 covered cargo test -p fparkan-vulkan-smoke --offline rejects_passed_without_swapchain_recreation blocked_report_includes_shader_manifest_and_bootstrap_status
|
S0-VK-027 covered cargo test -p fparkan-vulkan-smoke --offline rejects_passed_without_swapchain_recreation blocked_report_includes_shader_manifest_and_bootstrap_status
|
||||||
|
S0-VK-028 covered cargo test -p fparkan-vulkan-smoke --offline reports_rustc_host_triple blocked_report_includes_shader_manifest_and_bootstrap_status
|
||||||
S0-LIMIT-001 covered cargo test -p fparkan-binary --offline rejects_count_stride_overflow
|
S0-LIMIT-001 covered cargo test -p fparkan-binary --offline rejects_count_stride_overflow
|
||||||
S0-LIMIT-002 covered cargo test -p fparkan-binary --offline rejects_oversized_declared_allocation_before_read
|
S0-LIMIT-002 covered cargo test -p fparkan-binary --offline rejects_oversized_declared_allocation_before_read
|
||||||
L1-P1-NRES-001 covered cargo test -p fparkan-nres --offline licensed_corpora_nres_roundtrip_gates
|
L1-P1-NRES-001 covered cargo test -p fparkan-nres --offline licensed_corpora_nres_roundtrip_gates
|
||||||
|
|||||||
|
@@ -56,6 +56,7 @@
|
|||||||
`S0-VK-025`
|
`S0-VK-025`
|
||||||
`S0-VK-026`
|
`S0-VK-026`
|
||||||
`S0-VK-027`
|
`S0-VK-027`
|
||||||
|
`S0-VK-028`
|
||||||
`S0-LIMIT-001`
|
`S0-LIMIT-001`
|
||||||
`S0-LIMIT-002`
|
`S0-LIMIT-002`
|
||||||
`L1-P1-NRES-001`
|
`L1-P1-NRES-001`
|
||||||
|
|||||||
Reference in New Issue
Block a user