Welcome! Log In Create A New Profile

Advanced

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

Maxim Dounin
May 09, 2021 10:56AM
Hello!

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
description:
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.

(http://hg.nginx.org/nginx-tests/rev/4c43b3a0117c)

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
http://mdounin.ru/
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

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

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

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

Maxim Dounin 132 May 09, 2021 10:56AM



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

Online Users

Guests: 172
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready