#!/bin/sh
set -e -u
cp -a . "$AUTOPKGTEST_TMP"
cd "$AUTOPKGTEST_TMP"
rm -rf obj debian
mkdir obj
cd obj
cmake .. -DUNIT_TESTING=1
make -C tests/
cd tests
sed -e 's#\(LD_PRELOAD=[^:]*\)[^;]*/\(libuid_wrapper.so\)#\1:\2#' -i CTestTestfile.cmake
make test ARGS="--output-on-failure"
