Mercurial > hg > nginx-tests
changeset 232:4c43b3a0117c
Tests: revert 5db96b64cead, use "which" instead of "command -v".
It turns out that Linux doesn't have "command -v" (there are shell builtins,
but no standalone binary). Use "which" instead, and provide a special case
for Solaris.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 10 Sep 2012 19:55:12 +0400 |
parents | bc1861122d0c |
children | 1a5574d84917 |
files | lib/Test/Nginx.pm |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/Test/Nginx.pm Fri Sep 07 20:30:32 2012 +0400 +++ b/lib/Test/Nginx.pm Mon Sep 10 19:55:12 2012 +0400 @@ -124,8 +124,14 @@ return $self; } + if ($^O eq 'solaris') { + Test::More::plan(skip_all => "$daemon not found") + unless `command -v $daemon`; + return $self; + } + Test::More::plan(skip_all => "$daemon not found") - unless `command -v $daemon`; + unless `which $daemon`; return $self; }