diff options
author | Richard Levitte <levitte@openssl.org> | 2018-01-28 09:49:46 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2018-02-01 07:10:48 +0100 |
commit | 71bb86f0dc72c49d9efc098a71a6654004a2035a (patch) | |
tree | 49c531123f5e7a05775a008390c987478a05389a /util | |
parent | 39556e63ef6c079d144b07d7f492152abf9efe77 (diff) |
Make sure that apps/openssl prefixes its output with '# ' during tests
The reason to do this is that some output might start with an 'ok',
which TAP catches and takes for TAP output. The TAP compatible way is
to make all output it shouldn't catch look like comments.
We do this by setting the environment variable HARNESS_OSSL_PREFIX
during tests. When that is set, apps/openssl uses BIO_f_linebuffer
and sets its prefix to the content of that environment variable.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5224)
Diffstat (limited to 'util')
-rw-r--r-- | util/perl/OpenSSL/Test.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/util/perl/OpenSSL/Test.pm b/util/perl/OpenSSL/Test.pm index 4afbf8551c..e363a48473 100644 --- a/util/perl/OpenSSL/Test.pm +++ b/util/perl/OpenSSL/Test.pm @@ -1,4 +1,4 @@ -# Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy @@ -476,7 +476,9 @@ sub run { } close $pipe; } else { + $ENV{HARNESS_OSSL_PREFIX} = "# "; system("$prefix$cmd"); + delete $ENV{HARNESS_OSSL_PREFIX}; } $e = ($? & 0x7f) ? ($? & 0x7f)|0x80 : ($? >> 8); $r = $hooks{exit_checker}->($e); |