summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2018-08-29 18:17:52 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2018-08-30 12:11:45 +0200
commita147815ec96576730aba1591e8b910fb181bfca1 (patch)
tree9a3e6e08d5a52633f39f30a828247723806807d0 /tests
parentcd11fe1224af5dba5a04aaadf68ad5ca982177f5 (diff)
tests: build: run make distcheck from fresh clone
Just for sanity reasons. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/build/run-tests.sh19
1 files changed, 14 insertions, 5 deletions
diff --git a/tests/build/run-tests.sh b/tests/build/run-tests.sh
index 3c4fa347..db895c1d 100755
--- a/tests/build/run-tests.sh
+++ b/tests/build/run-tests.sh
@@ -1,23 +1,30 @@
#!/bin/bash
log_file="`pwd`/tests.log"
-tarball="nftables-0.8.1.tar.bz2"
dir=../..
-cmd=./configure
argument=( --without-cli --enable-debug --with-mini-gmp --enable-man-doc
--with-xtables --with-json)
ok=0
failed=0
[ -f $log_file ] && rm -rf $log_file
-cd $dir
+
+tmpdir=$(mktemp -d)
+if [ ! -w $tmpdir ] ; then
+ echo "Failed to create tmp file" >&2
+ exit 0
+fi
+
+git clone $dir $tmpdir >/dev/null 2>>$log_file
+cd $tmpdir
+
+autoreconf -fi >/dev/null 2>>$log_file
+./configure >/dev/null 2>>$log_file
echo "Testing build with distcheck"
make distcheck >/dev/null 2>>$log_file
rt=$?
-rm -rf $tarball
-
if [ $rt != 0 ] ; then
echo "Something went wrong. Check the log for details."
exit 1
@@ -41,5 +48,7 @@ for var in "${argument[@]}" ; do
fi
done
+rm -rf $tmpdir
+
echo "results: [OK] $ok [FAILED] $failed [TOTAL] $((ok+failed))"
exit 0