#!/bin/bash
# Run upstream's own test suite against the installed tree. The runners derive
# IGTOP from their own location, so installing test/ under
# /usr/share/rpi-image-gen means they exercise the installed tool rather than
# a source checkout.
set -eu

SUITE=/usr/share/rpi-image-gen/test

[ -x "${SUITE}/run-all.sh" ] || {
   echo "${SUITE}/run-all.sh missing - is rpi-image-gen-doc installed?" >&2
   exit 1
}

cd "${AUTOPKGTEST_TMP:-/tmp}"
exec "${SUITE}/run-all.sh"
