File: test

package info (click to toggle)
kstart 4.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,884 kB
  • sloc: ansic: 5,937; sh: 4,785; perl: 2,130; makefile: 142
file content (46 lines) | stat: -rwxr-xr-x 1,093 bytes parent folder | download
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
44
45
46
#!/bin/sh
#
# Run tests for continuous integration.
#
# This script is normally run in a test container, such as in Travis-CI.
#
# Copyright 2016, 2018-2021 Russ Allbery <eagle@eyrie.org>
#
# SPDX-License-Identifier: MIT

set -eux

# Normally, KERBEROS is set based on the CI matrix, but provide a default in
# case someone runs this test by hand.
KERBEROS="${KERBEROS:-mit}"

# Configure Perl to use the cpanm installation paths.
eval "$(perl -Mlocal::lib)"

# Generate Autotools files.
./bootstrap

# Build everything with Clang first, with warnings enabled.
if [ "$KERBEROS" = 'heimdal' ]; then
    ./configure CC=clang PATH_KRB5_CONFIG=/usr/bin/krb5-config.heimdal
else
    ./configure CC=clang
fi
make warnings

# Then rebuild everything with GCC with warnings enabled.
make distclean
if [ "$KERBEROS" = 'heimdal' ]; then
    ./configure CC=gcc PATH_KRB5_CONFIG=/usr/bin/krb5-config.heimdal
else
    ./configure CC=gcc
fi
make warnings

# Run the test suite.
make check

# Run additional style tests, but only in the MIT build.
if [ "$KERBEROS" = "mit" ]; then
    make check-cppcheck
fi