#!/bin/sh

testsdir="/usr/libexec/rocm/libhipblas2-tests"

# If autopkgtest called us, pass some extra options if not set
if [ -n "$AUTOPKGTEST_ARTIFACTS" ]; then
    # Save output as XML to artifacts, for download
    [ -n "${GTEST_OUTPUT:-}" ] || export GTEST_OUTPUT="xml:${AUTOPKGTEST_ARTIFACTS}/"
    # Also, hipblas-test now defaults to GTEST_LISTENER=NO_PASS_LINE_IN_LOG,
    # but we want to see all indidivual pass/fails
    [ -n "${GTEST_LISTENER:-}" ] || export GTEST_LISTENER=PASS_LINE_IN_LOG
fi

# Pass on all arguments to this script to the test binary
"$testsdir"/hipblas-test "$@"
