Skip to content
Snippets Groups Projects
run-tests 614 B
#!/bin/sh -ex

mkdir test_build || rm -Rf test_build/*
if ! ls debian/*.md5sums.gz 1> /dev/null 2>&1; then
  for md5 in debian/*.md5sums; do gzip --keep ${md5}; done
fi
cp --backup debian/*md5sums.gz tests/
cd test_build
cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON \
	-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON ../
for binary in $(dpkg -L lambda-align2 | grep bin/); do ln -s ${binary} bin/; done
cd tests
set +e
ctest  --parallel $(nproc) -I 1,10 ; RESULT=$?
if ls tests/*~ 1> /dev/null 2>&1; then \
  for backup in tests/*~; do mv $${backup} $${backup%\~}; done; \
fi
exit ${RESULT}