From e02a4783f1ed673572261abeb9cb49a6c43433e7 Mon Sep 17 00:00:00 2001 From: Surma Date: Sun, 8 Nov 2026 02:30:58 +0000 Subject: [PATCH] tests: include git compatibility in the shared executable --- host/tests/{ => it}/git_compat.rs | 22 +++------------------- host/tests/it/main.rs | 1 + 2 files changed, 4 insertions(+), 19 deletions(-) rename host/tests/{ => it}/git_compat.rs (84%) diff --git a/host/tests/git_compat.rs b/host/tests/it/git_compat.rs similarity index 84% rename from host/tests/git_compat.rs rename to host/tests/it/git_compat.rs index f4cbeb1..d5902d6 100644 --- a/host/tests/git_compat.rs +++ b/host/tests/it/git_compat.rs @@ -6,31 +6,15 @@ use sausage::{ #[tokio::test(flavor = "current_thread")] async fn default_identity_and_which() -> anyhow::Result<()> { - let repo = std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join(".."); - let userland = repo.join("userland"); - assert!( - std::process::Command::new("nu") - .args(["--no-config-file", "cwd-init/build.nu"]) - .current_dir(&userland) - .status()? - .success() - ); + let userland = std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("../userland"); + let target = crate::common::build_git(); assert!( std::process::Command::new("cargo") - .args([ - "build", - "--release", - "-p", - "git", - "-p", - "sausage-exec-tools", - "--locked" - ]) + .args(["build", "--release", "-p", "sausage-exec-tools", "--locked"]) .current_dir(&userland) .status()? .success() ); - let target = std::path::PathBuf::from(std::env::var("CARGO_TARGET_DIR")?); let bundle = tempfile::tempdir()?; std::fs::create_dir_all(bundle.path().join("bin"))?; std::fs::create_dir_all(bundle.path().join("src"))?; diff --git a/host/tests/it/main.rs b/host/tests/it/main.rs index 223e035..4dedb6a 100644 --- a/host/tests/it/main.rs +++ b/host/tests/it/main.rs @@ -34,6 +34,7 @@ mod durable; mod events; mod extension_names; mod extensions; +mod git_compat; mod git_runtime; mod goal_questions; mod harness;