summaryrefslogtreecommitdiffstats
path: root/src/shims/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/shims/mod.rs')
-rw-r--r--src/shims/mod.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/shims/mod.rs b/src/shims/mod.rs
index 67c6640..fd515bc 100644
--- a/src/shims/mod.rs
+++ b/src/shims/mod.rs
@@ -130,6 +130,14 @@ fn forced_fail(tool: &str) -> bool {
std::env::var("AUR_SHIM_FAIL").map(|v| v == tool).unwrap_or(false)
}
+/// Read back the shim's invocation log.
+///
+/// Test-tier only. The shim *appends* to `invocations.jsonl` in production —
+/// that is how a fake tool leaves evidence — but nothing in the crate reads the
+/// file back; `called_with` below is the only reader and it is gated with this.
+/// The census credited this function with production callers at the two lines
+/// that name the *filename* in a string, which is not a call.
+#[cfg(feature = "test-support")]
pub fn invocations(dir: &Path) -> Vec<serde_json::Value> {
let path = dir.join("invocations.jsonl");
match std::fs::read_to_string(path) {