[SCM] fluidsynth/master: Add a compile/run autopkg test.

alessio at users.alioth.debian.org alessio at users.alioth.debian.org
Sat Feb 2 13:38:57 UTC 2013


The following commit has been merged in the master branch:
commit 05e61862e14fc0169e09daf02babed670d30cef0
Author: Rafał Cieślak <rafalcieslak256 at ubuntu.com>
Date:   Thu Jan 17 23:20:55 2013 +0100

    Add a compile/run autopkg test.
    
    Closes: #692812

diff --git a/debian/control b/debian/control
index fe74be3..6493ec9 100644
--- a/debian/control
+++ b/debian/control
@@ -64,6 +64,7 @@ Depends:
  libreadline-dev (>= 5),
  libsndfile-dev,
  ${misc:Depends}
+XS-Testsuite: autopkgtest
 Description: Real-time MIDI software synthesizer (development files)
  Fluidsynth is a real-time midi synthesizer based on the soundfont2
  specifications. It can be used to render MIDI input or MIDI files to audio.
diff --git a/debian/tests/build b/debian/tests/build
new file mode 100644
index 0000000..bc32f4d
--- /dev/null
+++ b/debian/tests/build
@@ -0,0 +1,32 @@
+#!/bin/sh
+# autopkgtest check: Builds a small application against libfluidsynth, checking
+# if it compiles, links and runs successfully.
+# Author: Rafał Cieślak <rafalcieslak256 at ubuntu.com> 
+
+set -e
+
+WORKDIR=$(mktemp -d)
+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
+cd $WORKDIR
+cat <<EOF > build_test.c
+#include <fluidsynth.h>
+int main(int argc, char** argv) {
+    fluid_settings_t* settings;
+    fluid_synth_t* synth;
+    settings = new_fluid_settings();
+    //Using default settings.
+    synth = new_fluid_synth(settings);
+    if(!synth || !settings)
+	//a null pointer?
+	return 1;
+    delete_fluid_synth(synth);
+    delete_fluid_settings(settings);
+    return 0;
+}
+EOF
+
+gcc -o build_test build_test.c -lfluidsynth
+echo "build: OK"
+[ -x build_test ]
+./build_test
+echo "run: OK"
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..b1bea61
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: build
+Depends: build-essential, libfluidsynth-dev

-- 
fluidsynth packaging



More information about the pkg-multimedia-commits mailing list