#!/bin/bash
# Copyright © 2019 Collabora Ltd.
# SPDX-License-Identifier: BSD-3-Clause
# (See debian/copyright)

set -e
set -u
set -x
set -o pipefail

mkdir -p "${AUTOPKGTEST_ARTIFACTS:-.}/tests/platform"

fail=

for t in tests/platform/*.t tests/platform/*.py; do
    "$t" | tee "${AUTOPKGTEST_ARTIFACTS:-.}/${t}.tap" || fail=y
done

if [ -n "$fail" ]; then
    exit 1
fi
