File: run-tests

package info (click to toggle)
lambda-align2 2.0.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 976 kB
  • sloc: cpp: 6,980; sh: 118; makefile: 42
file content (20 lines) | stat: -rwxr-xr-x 740 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/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
mkdir -p libexec
for binary in $(dpkg -L lambda-align2 | grep libexec/); do ln -s ${binary} libexec/; done
cd tests
set +e
ctest  --parallel $(nproc) -I 1,10 --output-on-failure; RESULT=$?
if ls tests/*~ 1> /dev/null 2>&1; then \
  for backup in tests/*~; do mv $${backup} $${backup%\~}; done; \
fi
exit ${RESULT}