Make sure that apps/openssl prefixes its output with '# ' during tests
[openssl.git] / util / perl / OpenSSL / Test.pm
index 4afbf8551c06578d7747874adc2f8aa29c6fab62..e363a484731184825972520efdf7da9e60d7a14a 100644 (file)
@@ -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);