From: Varsha Rao <rvarsha016@gmail.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>, netfilter-devel@vger.kernel.org
Cc: Varsha Rao <rvarsha016@gmail.com>
Subject: [PATCH nft] tests: Add test for compile options.
Date: Sun, 14 Jan 2018 02:51:29 +0530 [thread overview]
Message-ID: <20180113212129.3475-2-rvarsha016@gmail.com> (raw)
In-Reply-To: <20180113212129.3475-1-rvarsha016@gmail.com>
This patch adds a script to test available compile options.
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
---
tests/build/run-tests.sh | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
create mode 100755 tests/build/run-tests.sh
diff --git a/tests/build/run-tests.sh b/tests/build/run-tests.sh
new file mode 100755
index 0000000..298acca
--- /dev/null
+++ b/tests/build/run-tests.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+if [ "$(id -u)" != "0" ] ; then
+ echo "Run as root user"
+ exit 1
+fi
+
+LOG_FILE="`pwd`/tests.log"
+dir=../..
+cmd=./configure
+argument=( --without-cli --enable-debug --with-mini-gmp --enable-pdf-doc --with-xtables )
+ok=0
+failed=0
+
+[ -f $LOG_FILE ] && rm -rf $LOG_FILE
+cd $dir
+
+for var in "${argument[@]}" ; do
+ echo "[EXECUTING] Testing compile option $var"
+ $cmd $var >/dev/null 2>>$LOG_FILE
+ rt=$?
+ echo -en "\033[1A\033[K" # clean the [EXECUTING] foobar line
+
+ if [ $rt -eq 0 ] ; then
+ echo "[OK] Compile option $var works."
+ ((ok++))
+ else
+ echo "[FAILED] Compile option $var does not work. Check log for details."
+ ((failed++))
+ fi
+done
+
+echo "results: [OK] $ok [FAILED] $failed [TOTAL] $((ok+failed))"
+exit 0
--
2.14.3
prev parent reply other threads:[~2018-01-13 21:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-13 21:21 [PATCH nft] tests: shell: Modify ipv6_maps_ipv4_0 file permission Varsha Rao
2018-01-13 21:21 ` Varsha Rao [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180113212129.3475-2-rvarsha016@gmail.com \
--to=rvarsha016@gmail.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).