#!/bin/bash -xe

sed -i 's/#for-autopkgtest/for-autopkgtest/g' debian/patches/series
dpkg-source --before-build "$(pwd)"
command -v qmake6 > /dev/null && QMAKE=qmake6 || QMAKE=qmake
${QMAKE} -o tests/Makefile tests/tests.pro
make -C tests check
