Infra for debugging and testing

This commit is contained in:
2025-02-03 12:01:21 +01:00
parent 1556d54226
commit d7dd2fd855
8 changed files with 112 additions and 57 deletions

19
xtask/src/orcx.rs Normal file
View File

@@ -0,0 +1,19 @@
use std::io;
use std::process::Command;
use std::sync::atomic::Ordering;
use crate::{Args, EXIT_OK};
pub fn orcx(_args: &Args, subcommand: &[String]) -> io::Result<()> {
eprintln!("running orcx {}", subcommand.join(" "));
let status = Command::new("cargo").args(["build", "-p", "orchid-std"]).status()?;
if status.success() {
let status = Command::new("cargo")
.args(["run", "-p", "orcx", "--"].into_iter().chain(subcommand.iter().map(|s| s.as_str())))
.status()?;
EXIT_OK.store(status.success(), Ordering::Relaxed);
} else {
EXIT_OK.store(false, Ordering::Relaxed);
}
Ok(())
}