summaryrefslogtreecommitdiffstats
path: root/debian/tests/clangmeson
blob: a5f1348877802433dad3c039dee7a1868771b053 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

set -eu

WORKDIR=$(mktemp -d)
trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
cd $WORKDIR
cat <<EOF > meson.build
project('debian clang package test', 'c')
e = executable('prog', 'prog.c')
test('debtest', e)
EOF
cat <<EOF > prog.c
int main(int argc, char **argv) {
  return 0;
}
EOF
mkdir build
CC=clang meson build
ninja -C build test