From b503900b1456e8bd4b60d1deb0ef7cc3665676f1 Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Sun, 4 Apr 2021 21:59:14 +0200 Subject: First step of cleaning up the Makefile.in hell. 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 --- tests/do.sh.in | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'tests/do.sh.in') 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() { -- cgit v1.2.3