summaryrefslogtreecommitdiffstats
path: root/src/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
index 05f9a74..5bcb5aa 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -50,6 +50,11 @@ pub struct Config {
pub shim_manifest: Option<PathBuf>,
/// Where shims record their invocations, exported as `AUR_SHIM_DIR`.
pub shim_dir: Option<PathBuf>,
+ /// Test hook: abort publish at a named point so I4 (atomic publish) can be
+ /// exercised for real. Never set in production.
+ pub publish_fault: Option<String>,
+ /// Test hook: the named shim must fail, e.g. `makechrootpkg`.
+ pub shim_fail: Option<String>,
}
impl Default for Config {
@@ -73,6 +78,8 @@ impl Default for Config {
path_prepend: None,
shim_manifest: None,
shim_dir: None,
+ publish_fault: None,
+ shim_fail: None,
}
}
}
@@ -115,6 +122,9 @@ impl Config {
if let Some(d) = &self.shim_dir {
cmd.env("AUR_SHIM_DIR", d);
}
+ if let Some(f) = &self.shim_fail {
+ cmd.env("AUR_SHIM_FAIL", f);
+ }
}
/// Create the directory tree the server needs. Idempotent.