diff options
Diffstat (limited to 'debian/tests/build-and-run-examples')
-rwxr-xr-x | debian/tests/build-and-run-examples | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/debian/tests/build-and-run-examples b/debian/tests/build-and-run-examples new file mode 100755 index 0000000..6145719 --- /dev/null +++ b/debian/tests/build-and-run-examples @@ -0,0 +1,18 @@ +#!/bin/sh + +set -e + +if [ -d "$AUTOPKGTEST_ARTIFACTS" ]; then + cd "$AUTOPKGTEST_ARTIFACTS" +fi + +for x in /usr/share/doc/librnp-dev/examples/*.c; do + bin="$(basename "$x" .c)" + printf 'building %s\n' "$bin" + gcc -g -O2 -Werror -Wall -pedantic -o "$bin" "$x" $(pkg-config --cflags --libs librnp) +done + +for x in generate encrypt decrypt sign verify; do + printf '**** %s ****\n' "$x" + "./$x" +done |