File: build-seq

package info (click to toggle)
alsa-lib 1.0.28-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 7,228 kB
  • ctags: 10,077
  • sloc: ansic: 77,234; sh: 11,192; makefile: 625
file content (26 lines) | stat: -rw-r--r-- 697 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh
# autopkgtest check: Builds a small application against libasound2, checking
# if it compiles, links and runs successfully
# Author: Rafał Cieślak <rafalcieslak256@ubuntu.com> 

set -e

WORKDIR=$(mktemp -d)
trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
cd $WORKDIR
cat <<EOF > asound_build_test.c
#include <alsa/asoundlib.h>
int main(int argc, char **argv)
{
	//Simple test that opens MIDI seq. That will work regardless of hardware factors.
	snd_seq_t *seq_handle;
	snd_seq_open(&seq_handle, "default", SND_SEQ_OPEN_INPUT, 0);
	return 0;
}
EOF

gcc -o asound_build_test asound_build_test.c -lasound
echo "build: OK"
[ -x asound_build_test ]
./asound_build_test 2>&1
echo "run: OK"