mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-17 02:48:34 +03:00
As it turns out, we had this set of unit tests since 2018, but so far they were not executed during the build verification. Let's fix this: * run unittest in discovery mode for all files in 'tests/' (commented out); * rename this file, so it can be automatically detected and executed; * properly import the API to be tested. Currently 2 out of 16 unit tests are failing, so we need to get them passing first and then uncomment the unittest execution. Change-Id: I4d4facfabc75187acd5238ff4d0f26022bd58f82
25 lines
540 B
Bash
Executable File
25 lines
540 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
if [ ! -d "./pysim-testdata/" ] ; then
|
|
echo "###############################################"
|
|
echo "Please call from pySim-prog top directory"
|
|
echo "###############################################"
|
|
exit 1
|
|
fi
|
|
|
|
virtualenv -p python3 venv --system-site-packages
|
|
. venv/bin/activate
|
|
pip install pytlv
|
|
pip install pyyaml
|
|
pip install cmd2
|
|
|
|
# Execute automatically discovered unit tests first
|
|
# TODO: uncomment once all tests are passing
|
|
# python -m unittest discover -v -s tests/
|
|
|
|
cd pysim-testdata
|
|
../tests/pysim-test.sh
|
|
|