summaryrefslogtreecommitdiffstats
path: root/subprojects/libhandy/debian/tests/build-test
diff options
context:
space:
mode:
Diffstat (limited to 'subprojects/libhandy/debian/tests/build-test')
-rwxr-xr-xsubprojects/libhandy/debian/tests/build-test30
1 files changed, 30 insertions, 0 deletions
diff --git a/subprojects/libhandy/debian/tests/build-test b/subprojects/libhandy/debian/tests/build-test
new file mode 100755
index 0000000..434a846
--- /dev/null
+++ b/subprojects/libhandy/debian/tests/build-test
@@ -0,0 +1,30 @@
+#!/bin/sh
+set -eu
+
+if [ -n "${DEB_HOST_GNU_TYPE:-}" ]; then
+ CROSS_COMPILE="$DEB_HOST_GNU_TYPE-"
+else
+ CROSS_COMPILE=
+fi
+
+cd "$AUTOPKGTEST_TMP"
+
+cat <<EOF > handytest.c
+#include <gtk/gtk.h>
+#include <handy.h>
+
+int
+main (int argc,
+ char **argv)
+{
+ gtk_init(&argc, &argv);
+ hdy_init();
+ hdy_keypad_new(FALSE, TRUE);
+}
+EOF
+
+${CROSS_COMPILE}gcc -o handytest handytest.c $(${CROSS_COMPILE}pkg-config --cflags --libs libhandy-1)
+echo "build ok"
+[ -x handytest ]
+xvfb-run -a -s "-screen 0 1024x768x24" ./handytest
+echo "starts ok"