summaryrefslogtreecommitdiffstats
path: root/debian/tests/crossbuild
diff options
context:
space:
mode:
Diffstat (limited to 'debian/tests/crossbuild')
-rwxr-xr-xdebian/tests/crossbuild23
1 files changed, 23 insertions, 0 deletions
diff --git a/debian/tests/crossbuild b/debian/tests/crossbuild
new file mode 100755
index 0000000..e2796b6
--- /dev/null
+++ b/debian/tests/crossbuild
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+set -e
+
+cd "${AUTOPKGTEST_TMP:-/tmp}"
+mkdir testproject
+cd testproject
+cat >meson.build <<EOF
+project('crosstest', 'c')
+executable('demo', 'main.c')
+EOF
+cat >main.c <<EOF
+#include<stdio.h>
+int main(int argc, char **argv) {
+ printf("Hello there.\n");
+ return 0;
+}
+EOF
+mkdir build
+cd build
+/usr/share/meson/debcrossgen --arch armhf -o cross-file.txt
+meson --cross-file cross-file.txt ..
+ninja