changeset 1963:5656138f2e46

Tests: improved has_daemon() to drop "which" stderr. On some platforms (notably OpenBSD) "which" prints an error if the command is not found. It is now dropped to produce less clutter during testing.
author Maxim Dounin <mdounin@mdounin.ru>
date Sun, 05 May 2024 23:56:16 +0300
parents f1ba89f735ba
children 3cae7b54841e
files lib/Test/Nginx.pm
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lib/Test/Nginx.pm
+++ b/lib/Test/Nginx.pm
@@ -336,7 +336,7 @@ sub has_daemon($) {
 	}
 
 	Test::More::plan(skip_all => "$daemon not found")
-		unless `which $daemon`;
+		unless `which $daemon 2>/dev/null`;
 
 	return $self;
 }