File: make-check

package info (click to toggle)
libticonv 1.1.5-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 596 kB
  • sloc: ansic: 3,033; makefile: 77; sh: 20
file content (37 lines) | stat: -rw-r--r-- 738 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
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh

set -eu

WORKDIR=$(mktemp -d)

trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM

# Copy the source tree:
cp -r . $WORKDIR
cd $WORKDIR

# Use installed binaries:
sed -i -e "s/-I\$(top_srcdir)[^[:blank:]]*/\$\$(pkg-config --cflags --libs ticonv)/" \
    -e "s/\$(top_builddir)[^[:blank:]]*/\$\$(pkg-config --libs ticonv)/" \
    -e "s/LDADD/LDFLAGS/" tests/Makefile.am

# Clean if necessary:
if [ -f debian/autoreconf.before ]; then
    dh_auto_clean
    dh_autoreconf_clean
fi

# Reconfigure:
dh_autoreconf
dh_auto_configure

# Run the tests:
make check

# Show if linked to the system's libs:
ldd tests/test_ticonv tests/torture_ticonv

# Log the test output:
if [ -f tests/test-suite.log ]; then
  cat tests/test-suite.log
fi