File: make-check

package info (click to toggle)
libticalcs 1.1.9%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 2,356 kB
  • sloc: ansic: 27,186; makefile: 229; sh: 22; sed: 16
file content (37 lines) | stat: -rw-r--r-- 746 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 ticalcs2)/" \
    -e "s/\$(top_builddir)[^[:blank:]]*/\$\$(pkg-config --libs ticalcs2)/" \
    -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_ticalcs_2 tests/torture_ticalcs

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