move "nix build" to tests/common

This commit is contained in:
cy 2025-04-28 21:39:14 -04:00
parent 76cbc85032
commit 05589641cf
2 changed files with 8 additions and 8 deletions

View file

@ -1,5 +1,6 @@
#![allow(dead_code)]
use std::process::Command;
use std::sync::Arc;
use nixcp::store::Store;
@ -14,6 +15,13 @@ pub struct Context {
impl Context {
fn new() -> Self {
// hello must be in the store
Command::new("nix")
.arg("build")
.arg("--no-link")
.arg(HELLO)
.status()
.unwrap();
let store = Arc::new(Store::connect().expect("connect to nix store"));
Self { store }
}