From bb8c043a76e92e2408922137e5313b9c86ac7b02 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 29 Mar 2025 09:05:50 +0100 Subject: [PATCH 1/2] uutests: add a doc --- CONTRIBUTING.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0621cf2a2..2e609083f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -36,6 +36,8 @@ parts for getting started: - [`src/bin/coreutils.rs`](https://github.com/uutils/coreutils/tree/main/src/bin/coreutils.rs): Code for the multicall binary. - [`docs`](https://github.com/uutils/coreutils/tree/main/docs/src): the documentation for the website +- [`tests/uutests/`](https://github.com/uutils/coreutils/tree/main/tests/uutests/): + Crate implementing the various functions to test uutils commands. Each utility is defined as a separate crate. The structure of each of these crates is as follows: From 8be432e6efca627608416e890678d2df5e20058d Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 29 Mar 2025 09:28:54 +0100 Subject: [PATCH 2/2] uutests: fix the doc --- tests/tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tests.rs b/tests/tests.rs index a4eaaacff..90d7c6e55 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -3,7 +3,6 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// Then override the macro with your constant use std::env; pub const TESTS_BINARY: &str = env!("CARGO_BIN_EXE_coreutils"); @@ -12,6 +11,7 @@ pub const TESTS_BINARY: &str = env!("CARGO_BIN_EXE_coreutils"); #[ctor::ctor] fn init() { unsafe { + // Necessary for uutests to be able to find the binary std::env::set_var("UUTESTS_BINARY_PATH", TESTS_BINARY); } }