[memtailor] 02/03: debian/tests/: Add test.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Wed Jun 10 04:50:28 UTC 2015


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

dtorrance-guest pushed a commit to branch master
in repository memtailor.

commit df03fe8077648714e5e99e340684f83ddfc05158
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date:   Mon Jun 8 23:53:06 2015 -0500

    debian/tests/: Add test.
---
 debian/tests/build   | 24 ++++++++++++++++++++++++
 debian/tests/control |  2 ++
 2 files changed, 26 insertions(+)

diff --git a/debian/tests/build b/debian/tests/build
new file mode 100755
index 0000000..739b831
--- /dev/null
+++ b/debian/tests/build
@@ -0,0 +1,24 @@
+#!/bin/sh
+# autopkgtest check: Build and run a program against memtailor, to verify that
+# the headers and pkg-config file are installed correctly
+# Author: Doug Torrance <dtorrance at monmouthcollege.edu>
+
+set -e
+
+WORKDIR=$(mktemp -d)
+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
+cd $WORKDIR
+cat <<EOF > memtailortest.cpp
+
+#include <memtailor.h>
+int main (int argc, char *argv[])
+{
+  memt::Arena arena;
+};
+EOF
+
+g++ -o memtailortest memtailortest.cpp -std=c++11 `pkg-config --cflags --libs memtailor`
+echo "build: OK"
+[ -x memtailortest ]
+./memtailortest
+echo "run: OK"
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..871c4db
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: build
+Depends: libmemtailor-dev, build-essential

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



More information about the debian-science-commits mailing list