Test pcap example

This commit is contained in:
ChillerDragon 2023-05-07 12:55:19 +02:00
parent 24d45bc0ab
commit 5a85dfd7a0
3 changed files with 17 additions and 1 deletions

View file

@ -28,7 +28,7 @@ pytest:
- pip install -r requirements/dev.txt
- pytest .
test_package:
test_package_and_examples:
stage: test
script:
- pip install -r requirements/dev.txt

Binary file not shown.

View file

@ -71,3 +71,19 @@ cp dist/twnet_parser-*.tar.gz /tmp/twnet_parser_test/
}
echo "[*] venv tests passed."
#
# examples/print_pcap_files
#
pushd examples/print_pcap_files || exit 1
pip install dpkt || exit 1
./print_pcap_files.py 07_dm1.pcap || exit 1
if ! ./print_pcap_files.py 07_dm1.pcap | grep -q snap_empty
then
echo "Error: examples/print_pcap_files.py did not print snap_empty"
exit 1
fi
popd || exit 1