]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
github-ci: add test for custom lib example
authorJason Ish <jason.ish@oisf.net>
Mon, 31 Mar 2025 19:13:09 +0000 (13:13 -0600)
committerVictor Julien <victor@inliniac.net>
Tue, 1 Apr 2025 08:17:05 +0000 (10:17 +0200)
Ticket: #7240

.github/workflows/builds.yml

index c2a3380ec30440415c0e57b4bf52e894eabdbed0..06200d335d6eabc9b7aef1632bcdbc0e545df9ac 100644 (file)
@@ -202,12 +202,20 @@ jobs:
         working-directory: examples/lib/simple
         run: PATH=/usr/local/bin:$PATH make -f Makefile.example clean all
 
+      - name: Test custom lib example
+        run: |
+          make
+          ./custom -- ../../../qa/docker/pcaps/tls.pcap
+          test $(cat eve.json |jq 'select(.stats) | .stats.decoder.pkts') = 110
+        working-directory: examples/lib/custom
+
       - name: Cleaning source directory for standalone plugin test.
         run: make clean
+
       - name: Test plugin against installed headers
         working-directory: examples/plugins/c-json-filetype
         run: |
-          # First use sed to pretend we are q user following our
+          # First use sed to pretend we are a user following our
           # directions for building a standalone plugin.
           sed -i 's/^#LIBSURICATA_CONFIG/LIBSURICATA_CONFIG/' Makefile
           sed -i 's/^#CPPFLAGS/CPPFLAGS/' Makefile