summaryrefslogtreecommitdiffstats
path: root/debian/tests/build-rbd
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 18:24:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 18:24:29 +0000
commitdf4528d6668ab18e40584fe540355bdfba0fb6dd (patch)
treef1bfdcb6485edff853369405dd5423c662c47345 /debian/tests/build-rbd
parentAdding upstream version 14.2.21. (diff)
downloadceph-df4528d6668ab18e40584fe540355bdfba0fb6dd.tar.xz
ceph-df4528d6668ab18e40584fe540355bdfba0fb6dd.zip
Adding debian version 14.2.21-1.debian/14.2.21-1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xdebian/tests/build-rbd24
1 files changed, 24 insertions, 0 deletions
diff --git a/debian/tests/build-rbd b/debian/tests/build-rbd
new file mode 100755
index 00000000..5ad6f882
--- /dev/null
+++ b/debian/tests/build-rbd
@@ -0,0 +1,24 @@
+#!/bin/sh
+# autopkgtest check: Build and run a program against librbd1 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 > rbdtest.c
+#include <rbd/librbd.h>
+
+int
+main(void)
+{
+ return(0);
+}
+EOF
+
+gcc -o rbdtest rbdtest.c -lrbd
+echo "build: OK"
+[ -x rbdtest ]
+./rbdtest
+echo "run: OK"