write the review-classifier fake agent scripts from a child process
This commit is contained in:
parent
c16cf1756f
commit
41f832458e
1 changed files with 31 additions and 11 deletions
|
|
@ -274,8 +274,6 @@ impl Sink for FinalText {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use std::os::unix::fs::PermissionsExt as _;
|
||||
|
||||
use swarm_wire::review_classifier::Prices;
|
||||
|
||||
use super::*;
|
||||
|
|
@ -347,12 +345,10 @@ done
|
|||
fn acp(dir: &Path) -> (Acp<Arc<Costs>>, Arc<Costs>) {
|
||||
let script = dir.join("agent.sh");
|
||||
let log = dir.join("log");
|
||||
std::fs::write(
|
||||
crate::test_script::write_executable(
|
||||
&script,
|
||||
AGENT.replacen("log=\"$1\"", &format!("log='{}'", log.display()), 1),
|
||||
)
|
||||
.expect("written");
|
||||
std::fs::set_permissions(&script, std::fs::Permissions::from_mode(0o755)).expect("chmod");
|
||||
&AGENT.replacen("log=\"$1\"", &format!("log='{}'", log.display()), 1),
|
||||
);
|
||||
let costs = Arc::new(Costs::default());
|
||||
let acp = Acp {
|
||||
program: PathBuf::from("/nix/store/x-opencode/bin/opencode"),
|
||||
|
|
|
|||
Loading…
Reference in a new issue