File: testsuite

package info (click to toggle)
libxcrypt 1%3A4.5.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,844 kB
  • sloc: ansic: 20,977; perl: 1,406; makefile: 720; python: 612; sh: 242
file content (43 lines) | stat: -rw-r--r-- 820 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/sh

set -e

WORKDIR=$(mktemp -d)
trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM

# build the tests, but do not run them
export DEB_BUILD_OPTIONS="nocheck $DEB_BUILD_OPTIONS"
dpkg-buildpackage --no-sign --rules-target build
cd build-deb1
make test-programs

# copy the built tests (not the libtool wrappers)
cp -a test/.libs/* $WORKDIR

cd $WORKDIR
errs=

for t in *; do
  echo "========== Running test $t =========="
  if [ -x ./$t ]; then
    rc=
    ./$t || rc=$?
    if [ -z "$rc" ]; then
      echo "========== OK $t =========="
    elif [ $rc -eq 77 ]; then
      echo "========== IGNORE $t =========="
    else
      echo "========== FAIL $t =========="
      errs="$errs $t"
    fi
  fi
done

if [ -n "$errs" ]; then
  echo "Testsuite failed ($errs)"
  exit 1
else
  echo "Testsuite passed"
  exit 0
fi