]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: build: run make distcheck from fresh clone
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 29 Aug 2018 16:17:52 +0000 (18:17 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 30 Aug 2018 10:11:45 +0000 (12:11 +0200)
Just for sanity reasons.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
tests/build/run-tests.sh

index 3c4fa347d02e1a19ff63c5afee18ab07ae6d25d5..db895c1dc2498f5af0fe5e3dec2a1c0da7f31632 100755 (executable)
@@ -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