Welcome! Log In Create A New Profile


Re: nginx-tests: replace non posix "which" with posix "command"

Maxim Dounin
May 09, 2021 10:56AM

On Sun, May 09, 2021 at 02:28:52PM +0500, Илья Шипицин wrote:

> please find attached patch.
> it improves experience by using generally available posix "command" instead
> of "which"

The last time I've tried it, it didn't work due to no "command"
binary on Linux:

changeset: 232:4c43b3a0117c
user: Maxim Dounin <mdounin@mdounin.ru>
date: Mon Sep 10 19:55:12 2012 +0400
files: lib/Test/Nginx.pm
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.


It's still the case at least on Ubuntu 20.10, leading to tests
being incorrectly skipped on Linux if "command -v" is used instead
of "which".

Maxim Dounin
nginx-devel mailing list
Subject Author Views Posted

nginx-tests: replace non posix "which" with posix "command"

Илья Шипицин 146 May 09, 2021 05:30AM

Re: nginx-tests: replace non posix "which" with posix "command"

Maxim Dounin 43 May 09, 2021 10:56AM

Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 47
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready