cmake $SRCTOP/gost-engine -DOPENSSL_ROOT_DIR="$OPENSSL_ROOT_DIR" -DOPENSSL_ENGINES_DIR="$OPENSSL_ROOT_DIR/engines"
make
export CTEST_OUTPUT_ON_FAILURE=1
-export HARNESS_OSSL_PREFIX=''
export OPENSSL_ENGINES="$PWD/bin"
export OPENSSL_APP="$O_EXE/openssl"
make test
echo " CWD: $PWD"
liboqs_DIR=$SRCTOP/oqs-provider/.local cmake $SRCTOP/oqs-provider -DOPENSSL_ROOT_DIR="$OPENSSL_ROOT_DIR" -B _build && cmake --build _build
export CTEST_OUTPUT_ON_FAILURE=1
-export HARNESS_OSSL_PREFIX=''
export OPENSSL_APP="$O_EXE/openssl"
export OPENSSL_MODULES=$PWD/_build/lib
export OQS_PROVIDER_TESTSCRIPTS=$SRCTOP/oqs-provider/scripts
echo "Running tests"
echo "------------------------------------------------------------------"
-# The OpenSSL app uses ${HARNESS_OSSL_PREFIX} as a prefix for its standard output
# For maintenance reasons and simplicity we only run test with kryoptic token
-HARNESS_OSSL_PREFIX= meson test -C $PKCS11_PROVIDER_BUILDDIR --suite=kryoptic
+meson test -C $PKCS11_PROVIDER_BUILDDIR --suite=kryoptic
if [ $? -ne 0 ]; then
cat $PKCS11_PROVIDER_BUILDDIR/meson-logs/testlog.txt
$ENV{HARNESS_OSSL_LEVEL} = $level + 1;
+ # We prefix the output with "# " in non-capture mode by default to avoid
+ # its interpretation by the TAP consumer.
+ my $default_prefix = $opts{capture} ? "" : "# ";
+ my $pipe;
+ local $_;
+
+ open($pipe, '-|', "$prefix$cmd") or die "Can't start command: $!";
+ while(<$pipe>) {
+ my $l = ($opts{prefix} // $default_prefix) . $_;
+ if ($opts{capture}) {
+ push @r, $l;
+ } else {
+ print STDOUT $l;
+ }
+ }
+ close $pipe;
+
# The dance we do with $? is the same dance the Unix shells appear to
# do. For example, a program that gets aborted (and therefore signals
# SIGABRT = 6) will appear to exit with the code 134. We mimic this
# to make it easier to compare with a manual run of the command.
- if ($opts{capture} || defined($opts{prefix})) {
- my $pipe;
- local $_;
-
- open($pipe, '-|', "$prefix$cmd") or die "Can't start command: $!";
- while(<$pipe>) {
- my $l = ($opts{prefix} // "") . $_;
- if ($opts{capture}) {
- push @r, $l;
- } else {
- print STDOUT $l;
- }
- }
- 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);
if ($opts{statusvar}) {