#!/bin/sh
set -e

echo "debian/rules override_dh_auto_configure "
debian/rules override_dh_auto_configure

# Suppress gcc warnings (autopkgtest treats them as failures)
make check-progs 2>/dev/null

# aligned_overflow takes longer than its 240s timeout on slow riscv64
# hardware (#1153316), see debian/rules
if [ "$(dpkg --print-architecture)" = riscv64 ]; then
    export RSYNC_EXCLUDE=aligned_overflow
fi

# Run tests
# installcheck "does *not* depend on building or installing: you can
# use it to check a version installed from a binary"
make installcheck
