From a147815ec96576730aba1591e8b910fb181bfca1 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Wed, 29 Aug 2018 18:17:52 +0200 Subject: tests: build: run make distcheck from fresh clone Just for sanity reasons. Signed-off-by: Pablo Neira Ayuso --- tests/build/run-tests.sh | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'tests/build/run-tests.sh') 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 -- cgit v1.2.3