initial import from Debian
version: 2.45-4 (UNRELEASED) commit: bf4f75f17a4f370adc9bf9feca09710ce76ecc63
This commit is contained in:
21
debian/tests/build
vendored
Normal file
21
debian/tests/build
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
CPUS=$(getconf _NPROCESSORS_ONLN)
|
||||
case "$CPUS" in
|
||||
[0-9]|[0-9][0-9]|[0-9][0-9][0-9]) ;;
|
||||
*) CPUS=1
|
||||
esac
|
||||
|
||||
if [ -n "${DEB_HOST_ARCH:-}" ]; then
|
||||
CROSS="-a$DEB_HOST_ARCH"
|
||||
else
|
||||
CROSS=
|
||||
fi
|
||||
|
||||
echo "Memory on this machine:"
|
||||
egrep '^(Mem|Swap)' /proc/meminfo || true
|
||||
|
||||
set -x
|
||||
DEB_BUILD_OPTIONS="parallel=$CPUS nohppa nomult nocross" dpkg-buildpackage -d -B --no-sign $CROSS
|
19
debian/tests/control
vendored
Normal file
19
debian/tests/control
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
Tests: build
|
||||
# this doesn't work well, without building -hppa, -multiarch and -cross packages
|
||||
#Depends: build-essential
|
||||
#Restrictions: build-needed
|
||||
Depends: build-essential,
|
||||
fakeroot,
|
||||
autoconf (>= 2.64),
|
||||
bison, flex, gettext, texinfo, dejagnu, quilt, chrpath, dwz, debugedit (>= 4.16),
|
||||
python3:any, file, xz-utils, lsb-release, zlib1g-dev, procps, libstdc++-dev,
|
||||
libjansson-dev, pkg-config,
|
||||
default-jdk-headless [amd64 arm64 i386 riscv64 x32],
|
||||
# build process emits warnings on stderr
|
||||
Restrictions: allow-stderr
|
||||
|
||||
Tests: libc-link
|
||||
Depends: build-essential
|
||||
|
||||
Tests: shlib-build
|
||||
Depends: build-essential
|
29
debian/tests/libc-link
vendored
Normal file
29
debian/tests/libc-link
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
# autopkgtest check: Build and run a simple program against libc, to verify
|
||||
# basic binutils compile-time and run-time linking functionality.
|
||||
#
|
||||
# (C) 2012 Canonical Ltd.
|
||||
# Author: Martin Pitt <martin.pitt@ubuntu.com>
|
||||
|
||||
set -e
|
||||
|
||||
WORKDIR=$(mktemp -d)
|
||||
trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
|
||||
cd $WORKDIR
|
||||
cat <<EOF > libctest.c
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
assert (1 > 0);
|
||||
assert (strcmp ("hello", "hello") == 0);
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
|
||||
gcc -o libctest libctest.c
|
||||
echo "build: OK"
|
||||
[ -x libctest ]
|
||||
./libctest
|
||||
echo "run: OK"
|
44
debian/tests/shlib-build
vendored
Normal file
44
debian/tests/shlib-build
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
#!/bin/sh
|
||||
# autopkgtest check: Build and link against a simple shared library, to test
|
||||
# basic binutils compile-time and run-time linking functionality.
|
||||
#
|
||||
# (C) 2012 Canonical Ltd.
|
||||
# Author: Martin Pitt <martin.pitt@ubuntu.com>
|
||||
|
||||
set -e
|
||||
|
||||
WORKDIR=$(mktemp -d)
|
||||
trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
|
||||
cd $WORKDIR
|
||||
cat <<EOF > testlib.c
|
||||
|
||||
int ultimate_answer()
|
||||
{
|
||||
return 42;
|
||||
}
|
||||
EOF
|
||||
|
||||
gcc -Wall -Werror -shared -o libultimate.so testlib.c
|
||||
echo "library build: OK"
|
||||
|
||||
# should export the symbol
|
||||
nm -D libultimate.so | grep -q 'T ultimate_answer'
|
||||
|
||||
# link it against a program
|
||||
cat <<EOF > testprog.c
|
||||
#include <assert.h>
|
||||
|
||||
int ultimate_answer();
|
||||
|
||||
int main()
|
||||
{
|
||||
assert (ultimate_answer() == 42);
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
|
||||
gcc -Wall -Werror -L . -o testprog testprog.c -lultimate
|
||||
echo "program build: OK"
|
||||
[ -x testprog ]
|
||||
LD_LIBRARY_PATH=. ./testprog
|
||||
echo "run: OK"
|
Reference in New Issue
Block a user