]> git.ipfire.org Git - thirdparty/openssl.git/commit
OpenSSL::Test: add a statusvar option for run with capture => 1
authorRichard Levitte <levitte@openssl.org>
Tue, 21 Mar 2017 09:53:56 +0000 (10:53 +0100)
committerRichard Levitte <levitte@openssl.org>
Tue, 21 Mar 2017 15:12:29 +0000 (16:12 +0100)
commit34a6a9b1599788ce4e85a08d579ff19bcb6a4b89
tree8ab61c29f28dd7fe6eef0c5d759ec2a3ed2c1020
parentb6ef12c4baa3a2c1ff0e3ac71270588dfcfe8cbd
OpenSSL::Test: add a statusvar option for run with capture => 1

When using run() with capture => 1, there was no way to find out if
the command was successful or not.  This change adds a statusvar
option, that must refer to a scalar variable, for example:

    my $status = undef;
    my @line = run(["whatever"], capture => 1, statusvar => \$status);

$status will be 1 if the command "whatever" was successful, 0
otherwise.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3004)
test/testlib/OpenSSL/Test.pm