[nginx-tests] Tests: improved has_daemon() to drop "which" stderr.
Maxim Dounin
mdounin at mdounin.ru
Sun May 5 20:56:59 UTC 2024
details: http://freenginx.org/hg/nginx-tests/rev/5656138f2e46
branches:
changeset: 1963:5656138f2e46
user: Maxim Dounin <mdounin at mdounin.ru>
date: Sun May 05 23:56:16 2024 +0300
description:
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.
diffstat:
lib/Test/Nginx.pm | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff --git a/lib/Test/Nginx.pm b/lib/Test/Nginx.pm
--- 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;
}
More information about the nginx-devel
mailing list