diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 03098777..3e025469 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -22,6 +22,7 @@ case "$JOB_TYPE" in . venv/bin/activate pip install -r requirements.txt + pip install pyshark # Execute automatically discovered unit tests first python -m unittest discover -v -s tests/ @@ -29,6 +30,7 @@ case "$JOB_TYPE" in # Run the test with physical cards cd pysim-testdata ../tests/pysim-test.sh + ../tests/pySim-trace_test.sh ;; "pylint") # Print pylint version diff --git a/pysim-testdata/pySim-trace_test_gsmtap.pcapng b/pysim-testdata/pySim-trace_test_gsmtap.pcapng new file mode 100644 index 00000000..35c3003e Binary files /dev/null and b/pysim-testdata/pySim-trace_test_gsmtap.pcapng differ diff --git a/tests/pySim-trace_test.sh b/tests/pySim-trace_test.sh new file mode 100755 index 00000000..0ec5e0f8 --- /dev/null +++ b/tests/pySim-trace_test.sh @@ -0,0 +1,20 @@ +#/bin/bash + +PYSIM_TRACE=../pySim-trace.py +GSMTAP_TRACE=pySim-trace_test_gsmtap.pcapng + +echo "pySim-trace_test - a test program to test pySim-trace.py" +echo "========================================================" + +$PYSIM_TRACE gsmtap-pyshark-pcap -f $GSMTAP_TRACE +if [ $? -ne 0 ]; then + echo "" + echo "========================================================" + echo "Testrun with $GSMTAP_TRACE failed." + exit 1 +fi + +echo "" +echo "========================================================" +echo "trace parsed without problems -- everything ok!" +