aboutsummaryrefslogtreecommitdiff
path: root/tests/do.sh.in
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2021-04-04 21:59:14 +0200
committerToni Uhlig <matzeton@googlemail.com>2021-07-30 22:09:21 +0200
commitb503900b1456e8bd4b60d1deb0ef7cc3665676f1 (patch)
tree92e7a88c190caf23f810e0a828b6da926f11879a /tests/do.sh.in
parent13c5d6801e3b9fdc71bec88c300243a939346a8d (diff)
First step of cleaning up the Makefile.in hell.first-step-to-automake-integration
The goal is to get rid of the Makefile.in's (replace it with Automake Makefile.am's) as they duplicate lot's of text. That decreases readability and is in general a bad design pattern. It seems appropriate to use Automake for an Autoconf based project. Currently achieved: * using libtool to build the core library (+libtool's semantic versioning) * out-of-source builds should work right now * introducing Automake based Makefile in src/ * removed some (maybe) unused GIT ignored files * provide some small python fixes Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'tests/do.sh.in')
-rwxr-xr-xtests/do.sh.in20
1 files changed, 12 insertions, 8 deletions
diff --git a/tests/do.sh.in b/tests/do.sh.in
index 01fad8497..4c081773b 100755
--- a/tests/do.sh.in
+++ b/tests/do.sh.in
@@ -1,26 +1,30 @@
#!/bin/sh
-cd "$(dirname "${0}")"
+BUILD_TESTS="$(realpath $(dirname "${0}"))"
+cd "$(dirname "${0}")/@srcdir@"
FUZZY_TESTING_ENABLED=@BUILD_FUZZTARGETS@
GCRYPT_ENABLED=@GCRYPT_ENABLED@
GCRYPT_PCAPS="gquic.pcap quic-23.pcap quic-24.pcap quic-27.pcap quic-28.pcap quic-29.pcap quic-mvfst-22.pcap quic-mvfst-27.pcapng quic-mvfst-exp.pcap quic_q50.pcap quic_t50.pcap quic_t51.pcap quic_0RTT.pcap quic_interop_V.pcapng quic-33.pcapng doq.pcapng doq_adguard.pcapng dlt_ppp.pcap os_detected.pcapng quic_frags_ch_out_of_order_same_packet_craziness.pcapng quic_frags_ch_in_multiple_packets.pcapng"
-READER="../example/ndpiReader -p ../example/protos.txt -c ../example/categories.txt -r ../example/risky_domains.txt -j ../example/ja3_fingerprints.csv -S ../example/sha1_fingerprints.csv"
+READER="${BUILD_TESTS}/../example/ndpiReader -p ../example/protos.txt -c ../example/categories.txt -r ../example/risky_domains.txt -j ../example/ja3_fingerprints.csv -S ../example/sha1_fingerprints.csv"
RC=0
PCAPS=`cd pcap; /bin/ls *.pcap *.pcapng`
-if [ ! -x "../example/ndpiReader" ]; then
- echo "$0: Missing $(realpath ../example/ndpiReader)"
- echo "$0: Run ./configure and make first"
+if [ ! -x "${BUILD_TESTS}/../example/ndpiReader" ]; then
+ echo "$0: Missing ${BUILD_TESTS}/../example/ndpiReader)"
+ echo "$0: Run make first."
exit 1
fi
fuzzy_testing() {
- if [ -f ../fuzz/fuzz_ndpi_reader ]; then
- ../fuzz/fuzz_ndpi_reader -max_total_time="${MAX_TOTAL_TIME:-592}" -print_pcs=1 -workers="${FUZZY_WORKERS:-0}" -jobs="${FUZZY_JOBS:-0}" pcap/
- fi
+ if [ -f "${BUILD_TESTS}/../fuzz/fuzz_ndpi_reader" ]; then
+ ${BUILD_TESTS}/../fuzz/fuzz_ndpi_reader \
+ -max_total_time="${MAX_TOTAL_TIME:-592}" -print_pcs=1 \
+ -workers="${FUZZY_WORKERS:-0}" -jobs="${FUZZY_JOBS:-0}" \
+ pcap/
+ fi
}
build_results() {