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