summaryrefslogtreecommitdiff
path: root/test/run_tests.sh
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2021-03-24 12:46:25 +0100
committerToni Uhlig <matzeton@googlemail.com>2021-03-24 13:16:55 +0100
commit1ab6b9e042060fab28be84f72af6df655d933f1d (patch)
tree343cd32d3ea7a5de25e2dd223da3395dd2c39a1d /test/run_tests.sh
parent77b4b88b1469161c19a3f6e5a319967a3f4445e9 (diff)
Updated test outputs and pinned travis-ci's nDPI git repo sync to a specific commit hash.
* fixed Makefile.old COpts hell Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'test/run_tests.sh')
-rwxr-xr-xtest/run_tests.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/run_tests.sh b/test/run_tests.sh
index 51261ecb5..acb080f39 100755
--- a/test/run_tests.sh
+++ b/test/run_tests.sh
@@ -2,6 +2,7 @@
set -e
+LINE_SPACES=${LINE_SPACES:-48}
MYDIR="$(realpath "$(dirname ${0})")"
nDPId_test_EXEC="${2:-"$(realpath "${MYDIR}/../nDPId-test")"}"
nDPI_SOURCE_ROOT="${1}"
@@ -20,6 +21,7 @@ nDPI_TEST_DIR="${nDPI_SOURCE_ROOT}/tests/pcap"
cat <<EOF
nDPId-test......: ${nDPId_test_EXEC}
nDPI source root: ${nDPI_TEST_DIR}
+
EOF
cd "${nDPI_TEST_DIR}"
@@ -27,8 +29,6 @@ mkdir -p /tmp/nDPId-test-stderr
set +e
RETVAL=0
for pcap_file in $(ls *.pcap*); do
- printf '%s' "${pcap_file}"
-
${nDPId_test_EXEC} "${pcap_file}" \
>"${MYDIR}/results/${pcap_file}.out.new" \
2>"/tmp/nDPId-test-stderr/${pcap_file}.out"
@@ -36,9 +36,9 @@ for pcap_file in $(ls *.pcap*); do
if [ $? -eq 0 ]; then
if diff -u0 "${MYDIR}/results/${pcap_file}.out" \
"${MYDIR}/results/${pcap_file}.out.new" >/dev/null; then
- printf ' [%s]\n' 'OK'
+ printf "%-${LINE_SPACES}s\t%s\n" "${pcap_file}" '[OK]'
else
- printf ' [%s]\n' 'DIFF'
+ printf "%-${LINE_SPACES}s\t%s\n" "${pcap_file}" '[DIFF]'
diff -u0 "${MYDIR}/results/${pcap_file}.out" \
"${MYDIR}/results/${pcap_file}.out.new"
mv -v "${MYDIR}/results/${pcap_file}.out.new" \
@@ -46,7 +46,7 @@ for pcap_file in $(ls *.pcap*); do
RETVAL=1
fi
else
- printf ' [%s]\n' 'FAIL'
+ printf "%-${LINE_SPACES}s\t%s\n" "${pcap_file}" '[FAIL]'
RETVAL=1
fi