#!/bin/sh

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

# Any individual failure is overall failure
exitcode=0
for testname in "$testsdir"/test*; do
    # 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}/"
    fi
	$testname "$@" || exitcode=1
done
exit $exitcode
