(root: &Path, home: &Path, args: &[&str])
| 39 | const ATOMIC_BIN: &str = env!("CARGO_BIN_EXE_atomic"); |
| 40 | |
| 41 | fn atomic(root: &Path, home: &Path, args: &[&str]) -> Output { |
| 42 | let mut command = Command::new(ATOMIC_BIN); |
| 43 | command.args(args); |
| 44 | // Native/incremental semantic lifecycle belongs to the ordinary importer. |
| 45 | if args.starts_with(&["git", "import"]) { |
| 46 | command.arg("--no-stream"); |
| 47 | } |
| 48 | command |
| 49 | .current_dir(root) |
| 50 | .env("HOME", home) |
| 51 | .env("ATOMIC_HOME", home.join(".atomic")) |
| 52 | // CB-9C hermeticity: the post-record shadow projection commits to |
| 53 | // Git, so the spawned atomic must resolve a stable committer |
| 54 | // identity without the machine's global gitconfig (an isolated |
| 55 | // HOME has none). |
| 56 | .env("GIT_CONFIG_GLOBAL", "/dev/null") |
| 57 | .env("GIT_CONFIG_SYSTEM", "/dev/null") |
| 58 | .env("GIT_AUTHOR_NAME", "CB-9B Tests") |
| 59 | .env("GIT_AUTHOR_EMAIL", "cb9b@example.com") |
| 60 | .env("GIT_COMMITTER_NAME", "CB-9B Tests") |
| 61 | .env("GIT_COMMITTER_EMAIL", "cb9b@example.com") |
| 62 | .output() |
| 63 | .expect("run atomic") |
| 64 | } |
| 65 | |
| 66 | fn atomic_text(output: &Output) -> String { |
| 67 | format!( |
no test coverage detected