From 8001be03353fb2f113f1dc2054214e6baadd5ce6 Mon Sep 17 00:00:00 2001 From: Reuben Wong Date: Sat, 31 Jan 2026 00:02:49 +0800 Subject: [PATCH] failure expected on android temp directory is not located at /tmp --- tests/by-util/test_mktemp.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/by-util/test_mktemp.rs b/tests/by-util/test_mktemp.rs index b4d9c6c27..652f32a40 100644 --- a/tests/by-util/test_mktemp.rs +++ b/tests/by-util/test_mktemp.rs @@ -864,13 +864,13 @@ fn test_nonexistent_tmpdir_env_var() { #[test] fn test_empty_tmpdir_env_var() { - #[cfg(not(windows))] + #[cfg(not(any(windows, target_os = "android")))] { let result = new_ucmd!().env(TMPDIR, "").succeeds(); assert!(result.stdout_str().starts_with("/tmp")); } - #[cfg(windows)] + #[cfg(any(windows, target_os = "android"))] { let result = new_ucmd!().env(TMPDIR, "").fails(); result.no_stdout(); @@ -885,13 +885,13 @@ fn test_empty_tmpdir_env_var() { ); } - #[cfg(not(windows))] + #[cfg(not(any(windows, target_os = "android")))] { let result = new_ucmd!().env(TMPDIR, "").arg("-d").succeeds(); assert!(result.stdout_str().starts_with("/tmp")); } - #[cfg(windows)] + #[cfg(any(windows, target_os = "android"))] { let result = new_ucmd!().env(TMPDIR, "").arg("-d").fails(); result.no_stdout();