[sdformat] 02/03: Support for autopkgtest

Jose Luis Rivero jrivero-guest at moszumanska.debian.org
Fri May 9 19:36:56 UTC 2014


This is an automated email from the git hooks/post-receive script.

jrivero-guest pushed a commit to branch master
in repository sdformat.

commit 2b207c629845c735f6ca51a70d59027cc96d775a
Author: Jose Luis Rivero <jrivero at osrfoundation.org>
Date:   Fri May 9 19:35:31 2014 +0000

    Support for autopkgtest
---
 debian/tests/build   | 27 +++++++++++++++++++++++++++
 debian/tests/control |  2 ++
 2 files changed, 29 insertions(+)

diff --git a/debian/tests/build b/debian/tests/build
new file mode 100755
index 0000000..0abc226
--- /dev/null
+++ b/debian/tests/build
@@ -0,0 +1,27 @@
+#!/bin/sh
+# autopkgtest check: Build and run a program against glib, to verify that the
+# headers and pkg-config file are installed correctly
+# (C) 2012 Jose Luis Rivero
+# Author: Jose Luis Rivero <jrivero at osrfoundation.org>
+
+set -e
+
+WORKDIR=$(mktemp -d)
+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
+cd $WORKDIR
+cat <<EOF > sdformattest.c
+#include <sdf/sdf.hh>
+
+int main()
+{
+    sdf::SDFPtr p(new sdf::SDF());
+    sdf::init(p);
+    return 0;
+}
+EOF
+
+g++ -o sdformattest sdformattest.c `pkg-config --cflags --libs sdformat`
+echo "build: OK"
+[ -x sdformattest ]
+./sdformattest
+echo "run: OK"
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..bede330
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: build
+Depends: libsdformat-dev, build-essential

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sdformat.git



More information about the debian-science-commits mailing list