From: Jon Spillett Date: Thu, 3 Sep 2020 04:02:48 +0000 (+1000) Subject: Use return code for 'which command' checks X-Git-Tag: openssl-3.0.0-alpha7~369 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=884baafba4a5fec6502b828a73188d7133b9179b;p=thirdparty%2Fopenssl.git Use return code for 'which command' checks Reviewed-by: Shane Lontis Reviewed-by: Matt Caswell Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/12775) --- diff --git a/test/recipes/81-test_cmp_cli.t b/test/recipes/81-test_cmp_cli.t index 8c4f0f920a5..fa70c849817 100644 --- a/test/recipes/81-test_cmp_cli.t +++ b/test/recipes/81-test_cmp_cli.t @@ -37,9 +37,9 @@ plan skip_all => "Tests involving CMP server not available on Windows or VMS" plan skip_all => "Tests involving CMP server not available in cross-compile builds" if defined $ENV{EXE_SHELL}; plan skip_all => "Tests involving CMP server require 'kill' command" - unless `which kill`; + if system("which kill"); plan skip_all => "Tests involving CMP server require 'lsof' command" - unless `which lsof`; # this typically excludes Solaris + if system("which lsof"); # this typically excludes Solaris sub chop_dblquot { # chop any leading & trailing '"' (needed for Windows) my $str = shift;