blob: c62999251c0ec07764a08b99b645a1d6e0daf7b6 (
plain)
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
|
#!/bin/sh
# autopkgtest check: Build and run a program against librados2 to
# validate that headers are installed and libraries exists
set -e
WORKDIR=$(mktemp -d)
trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
cd $WORKDIR
cat <<EOF > radostest.c
#include <rados/librados.h>
int
main(void)
{
int err;
rados_t cluster;
err = rados_create(&cluster, NULL);
if (err < 0) {
return (1);
}
return(0);
}
EOF
gcc -o radostest radostest.c -lrados
echo "build: OK"
[ -x radostest ]
./radostest
echo "run: OK"
|