[libfann] 127/133: autopkgtest (build): rewrite to make use of $ADTTMP
Christian Kastner
chrisk-guest at moszumanska.debian.org
Sat Oct 4 21:07:56 UTC 2014
This is an automated email from the git hooks/post-receive script.
chrisk-guest pushed a commit to branch master
in repository libfann.
commit a0d26d31e5f0ef411dbdb8d32bc702fc4d9a007b
Author: Christian Kastner <debian at kvr.at>
Date: Wed Apr 23 22:33:54 2014 +0200
autopkgtest (build): rewrite to make use of $ADTTMP
---
debian/copyright | 1 +
debian/tests/build | 15 ++++++++++++---
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/debian/copyright b/debian/copyright
index 62de035..700f5cf 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -23,6 +23,7 @@ License: BSD-3-clause
Files: debian/tests/*
Copyright: 2012, Steffen Nissen <lukesky at diku.dk>
2013, Vibhav Pant <vibhavp at ubuntu.com>
+ 2014, Christian Kastner <debian at kvr.at>
License: LGPL-2.1+
License: LGPL-2.1+
diff --git a/debian/tests/build b/debian/tests/build
index a012b29..6d7f812 100644
--- a/debian/tests/build
+++ b/debian/tests/build
@@ -4,12 +4,20 @@
# Source taken from http://leenissen.dk/fann/wp/help/getting-started/
# (C) 2013 Vibhav Pant
# Author: Vibhav Pant <vibhavp at ubuntu.com>
+#
+# Updated by Christian Kastner <debian at kvr.at> to use $ADTTMP.
set -e
-WORKDIR=$(mktemp -d)
-trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
-cd $WORKDIR
+# Presence of $ADTTMP implies that someone will handle cleanup for us, so we
+# can avoid duplicating the effort (signal handling, etc.) here.
+if [ -z "$ADTTMP" ]
+then
+ echo "Required envvar \"$ADTTMP\"is not set" >&2
+ exit 1
+fi
+
+cd "$ADTTMP"
cat <<EOF > libfann_test.c
#include <fann.h>
@@ -28,6 +36,7 @@ int main(void)
return 0;
}
EOF
+
gcc -o libfann_test libfann_test.c -lfann -Wall -Werror
echo "build: OK"
[ -x libfann_test ]
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/libfann.git
More information about the debian-science-commits
mailing list