2025-03-29 09:36:33 +01:00
|
|
|
// This file is part of the uutils util-linux package.
|
2024-01-26 20:06:52 +01:00
|
|
|
//
|
|
|
|
|
// For the full copyright and license information, please view the LICENSE
|
|
|
|
|
// file that was distributed with this source code.
|
|
|
|
|
|
2025-03-29 09:36:33 +01:00
|
|
|
use std::env;
|
|
|
|
|
|
|
|
|
|
pub const TESTS_BINARY: &str = env!("CARGO_BIN_EXE_util-linux");
|
|
|
|
|
|
|
|
|
|
// Use the ctor attribute to run this function before any tests
|
2026-05-03 14:47:12 +02:00
|
|
|
#[ctor::ctor(unsafe)]
|
2025-03-29 09:36:33 +01:00
|
|
|
fn init() {
|
|
|
|
|
unsafe {
|
|
|
|
|
// Necessary for uutests to be able to find the binary
|
|
|
|
|
std::env::set_var("UUTESTS_BINARY_PATH", TESTS_BINARY);
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-01-26 20:06:52 +01:00
|
|
|
#[cfg(feature = "lscpu")]
|
|
|
|
|
#[path = "by-util/test_lscpu.rs"]
|
|
|
|
|
mod test_lscpu;
|
|
|
|
|
|
2024-08-02 21:47:29 +08:00
|
|
|
#[cfg(feature = "lsmem")]
|
|
|
|
|
#[path = "by-util/test_lsmem.rs"]
|
|
|
|
|
mod test_lsmem;
|
|
|
|
|
|
2025-02-21 22:23:57 +02:00
|
|
|
#[cfg(feature = "lslocks")]
|
|
|
|
|
#[path = "by-util/test_lslocks.rs"]
|
|
|
|
|
mod test_lslocks;
|
|
|
|
|
|
2026-06-09 13:09:55 +05:30
|
|
|
#[cfg(feature = "lsns")]
|
|
|
|
|
#[path = "by-util/test_lsns.rs"]
|
|
|
|
|
mod test_lsns;
|
|
|
|
|
|
2025-03-01 22:38:19 +02:00
|
|
|
#[cfg(feature = "mesg")]
|
|
|
|
|
#[path = "by-util/test_mesg.rs"]
|
|
|
|
|
mod test_mesg;
|
|
|
|
|
|
2024-01-26 20:06:52 +01:00
|
|
|
#[cfg(feature = "mountpoint")]
|
|
|
|
|
#[path = "by-util/test_mountpoint.rs"]
|
|
|
|
|
mod test_mountpoint;
|
2024-05-12 19:37:17 +08:00
|
|
|
|
2025-09-14 18:58:46 +03:00
|
|
|
#[cfg(feature = "nologin")]
|
|
|
|
|
#[path = "by-util/test_nologin.rs"]
|
|
|
|
|
mod test_nologin;
|
|
|
|
|
|
2025-01-13 00:35:27 +02:00
|
|
|
#[cfg(feature = "blockdev")]
|
|
|
|
|
#[path = "by-util/test_blockdev.rs"]
|
|
|
|
|
mod test_blockdev;
|
|
|
|
|
|
2025-09-12 23:25:05 +03:00
|
|
|
#[cfg(feature = "cal")]
|
|
|
|
|
#[path = "by-util/test_cal.rs"]
|
|
|
|
|
mod test_cal;
|
|
|
|
|
|
2024-05-12 19:37:17 +08:00
|
|
|
#[cfg(feature = "ctrlaltdel")]
|
|
|
|
|
#[path = "by-util/test_ctrlaltdel.rs"]
|
|
|
|
|
mod test_ctrlaltdel;
|
2024-06-28 22:23:50 +08:00
|
|
|
|
2025-03-12 10:05:26 +01:00
|
|
|
#[cfg(feature = "renice")]
|
|
|
|
|
#[path = "by-util/test_renice.rs"]
|
|
|
|
|
mod test_renice;
|
|
|
|
|
|
2024-06-28 22:23:50 +08:00
|
|
|
#[cfg(feature = "rev")]
|
|
|
|
|
#[path = "by-util/test_rev.rs"]
|
|
|
|
|
mod test_rev;
|
2024-09-19 23:43:18 +08:00
|
|
|
|
2025-09-20 04:50:13 +03:00
|
|
|
#[cfg(feature = "setpgid")]
|
|
|
|
|
#[path = "by-util/test_setpgid.rs"]
|
|
|
|
|
mod test_setpgid;
|
|
|
|
|
|
2024-10-02 07:41:13 -03:00
|
|
|
#[cfg(feature = "setsid")]
|
|
|
|
|
#[path = "by-util/test_setsid.rs"]
|
|
|
|
|
mod test_setsid;
|
|
|
|
|
|
2024-09-19 23:43:18 +08:00
|
|
|
#[cfg(feature = "last")]
|
|
|
|
|
#[path = "by-util/test_last.rs"]
|
|
|
|
|
mod test_last;
|
2024-11-14 22:50:36 +07:00
|
|
|
|
|
|
|
|
#[cfg(feature = "dmesg")]
|
|
|
|
|
#[path = "by-util/test_dmesg.rs"]
|
|
|
|
|
mod test_dmesg;
|
2025-01-04 14:27:06 +02:00
|
|
|
|
|
|
|
|
#[cfg(feature = "fsfreeze")]
|
|
|
|
|
#[path = "by-util/test_fsfreeze.rs"]
|
|
|
|
|
mod test_fsfreeze;
|
2025-03-18 20:16:53 +02:00
|
|
|
|
2025-09-12 23:24:33 +03:00
|
|
|
#[cfg(feature = "hexdump")]
|
|
|
|
|
#[path = "by-util/test_hexdump.rs"]
|
|
|
|
|
mod test_hexdump;
|
|
|
|
|
|
2025-03-18 20:16:53 +02:00
|
|
|
#[cfg(feature = "mcookie")]
|
|
|
|
|
#[path = "by-util/test_mcookie.rs"]
|
|
|
|
|
mod test_mcookie;
|
2025-04-19 23:59:35 +00:00
|
|
|
|
|
|
|
|
#[cfg(feature = "uuidgen")]
|
|
|
|
|
#[path = "by-util/test_uuidgen.rs"]
|
|
|
|
|
mod test_uuidgen;
|