#!/bin/sh -ex

dpkg-source --before-build $(pwd)
patch -p1 < debian/patches/autopkgtest-Use-system-library-to-run-test.patch

rm -f short_coll_data.gz
mkdir -p build
skip_valgrind=0
if [ "$(dpkg --print-architecture)" = armhf ]; then
    skip_valgrind=1
fi
make BITS=default SKIP_VALGRIND="$skip_valgrind" release_test
