diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2022-03-16 11:03:57 +0100 |
---|---|---|
committer | lns <matzeton@googlemail.com> | 2022-04-14 19:17:48 +0200 |
commit | c3df3a12aa88739e303340ccd7436d467b4662d2 (patch) | |
tree | 13355914f93b668afb47f2b5b643dffc073fb8e7 /tests/do.sh.in | |
parent | 4775be3d85434d4e385f43a47b783844bbfb2571 (diff) |
Fixed msys2 build warnings and re-activated CI Mingw64 build.fix/windows-msys2
* Removed Visual Studio leftovers. Maintaining an autotools project with VS integration requires some additional overhead.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Signed-off-by: lns <matzeton@googlemail.com>
Diffstat (limited to 'tests/do.sh.in')
-rwxr-xr-x | tests/do.sh.in | 44 |
1 files changed, 27 insertions, 17 deletions
diff --git a/tests/do.sh.in b/tests/do.sh.in index dc4ed6a92..120b66b28 100755 --- a/tests/do.sh.in +++ b/tests/do.sh.in @@ -3,26 +3,29 @@ cd "$(dirname "${0}")" FUZZY_TESTING_ENABLED=@BUILD_FUZZTARGETS@ -if [ "$NDPI_DISABLE_FUZZY" = "1" ]; then +if [ "${NDPI_DISABLE_FUZZY}" = "1" ]; then FUZZY_TESTING_ENABLED=0 fi #Remember: valgrind and *SAN are incompatible! -VALGRIND="" -if [ "$NDPI_TESTS_VALGRIND" = "1" ]; then - VALGRIND="valgrind -q --leak-check=full" +CMD_PREFIX="${CMD_PREFIX}" +if [ "${NDPI_TESTS_WINE}" = "1" ]; then + CMD_PREFIX="wine" +elif [ "${NDPI_TESTS_VALGRIND}" = "1" ]; then + CMD_PREFIX="valgrind -q --leak-check=full" fi +EXE_SUFFIX=@EXE_SUFFIX@ PCRE_ENABLED=@PCRE_ENABLED@ PCRE_PCAPS="WebattackRCE.pcap" 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 quic-v2-00.pcapng" -READER="$VALGRIND ../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="${CMD_PREFIX} ../example/ndpiReader${EXE_SUFFIX} -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 *.cap` -if [ ! -x "../example/ndpiReader" ]; then - echo "$0: Missing $(realpath ../example/ndpiReader)" +if [ ! -x "../example/ndpiReader${EXE_SUFFIX}" ]; then + echo "$0: Missing $(realpath ../example/ndpiReader${EXE_SUFFIX})" echo "$0: Run ./configure and make first" exit 1 fi @@ -68,18 +71,25 @@ check_results() { if [ -f result/$f.out ]; then CMD="$READER -q -t -i pcap/$f -w /tmp/reader.out -v 2" $CMD - NUM_DIFF=`diff result/$f.out /tmp/reader.out | wc -l` - - if [ $NUM_DIFF -eq 0 ]; then - printf "%-48s\tOK\n" "$f" + CMD_RET=$? + if [ $CMD_RET -eq 0 ]; then + NUM_DIFF=`diff result/$f.out /tmp/reader.out | wc -l` else - printf "%-48s\tERROR\n" "$f" - echo "$CMD [old vs new]" - diff result/$f.out /tmp/reader.out - RC=1 + printf "%-48s\tERROR (ndpiReader${EXE_SUFFIX} exit code: ${CMD_RET})\n" "$f" + RC=1 + continue + fi + + if [ $NUM_DIFF -eq 0 ]; then + printf "%-48s\tOK\n" "$f" + else + printf "%-48s\tERROR\n" "$f" + echo "$CMD [old vs new]" + diff result/$f.out /tmp/reader.out + RC=1 fi - /bin/rm /tmp/reader.out + /bin/rm -f /tmp/reader.out fi done } @@ -90,4 +100,4 @@ fi build_results check_results $* -exit $RC
\ No newline at end of file +exit $RC |