[PATCH nft 1/2] tests: build: run make distcheck from fresh clone

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Just for sanity reasons.

Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
---
 tests/build/run-tests.sh | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/tests/build/run-tests.sh b/tests/build/run-tests.sh
index 3c4fa347d02e..db895c1dc249 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
-- 
2.11.0




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux