diff options
Diffstat (limited to 'debian/tests/build-rbd')
-rwxr-xr-x | debian/tests/build-rbd | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/debian/tests/build-rbd b/debian/tests/build-rbd new file mode 100755 index 000000000..5ad6f8823 --- /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" |