2018-07-19 21:31:39 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2019-05-10 14:20:54 +00:00
|
|
|
if [ ! -d "./pysim-testdata/" ] ; then
|
2018-07-19 21:31:39 +00:00
|
|
|
echo "###############################################"
|
2019-05-10 14:20:54 +00:00
|
|
|
echo "Please call from pySim-prog top directory"
|
2018-07-19 21:31:39 +00:00
|
|
|
echo "###############################################"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2020-10-19 08:32:34 +00:00
|
|
|
virtualenv -p python3 venv --system-site-packages
|
2018-07-19 21:31:39 +00:00
|
|
|
. venv/bin/activate
|
|
|
|
pip install pytlv
|
2019-08-30 09:41:02 +00:00
|
|
|
pip install pyyaml
|
2021-01-08 22:29:35 +00:00
|
|
|
pip install cmd2
|
2021-04-06 22:14:40 +00:00
|
|
|
pip install jsonpath-ng
|
2021-04-10 15:22:35 +00:00
|
|
|
pip install construct
|
2018-07-19 21:31:39 +00:00
|
|
|
|
2021-03-11 22:17:27 +00:00
|
|
|
# Execute automatically discovered unit tests first
|
2021-03-12 00:13:05 +00:00
|
|
|
python -m unittest discover -v -s tests/
|
2021-03-11 22:17:27 +00:00
|
|
|
|
2021-04-03 18:21:02 +00:00
|
|
|
# attempt to build documentation
|
|
|
|
pip install sphinx
|
|
|
|
pip install sphinxcontrib-napoleon
|
2021-04-04 12:37:55 +00:00
|
|
|
pip3 install -e 'git+https://github.com/osmocom/sphinx-argparse@master#egg=sphinx-argparse'
|
2021-04-03 18:21:02 +00:00
|
|
|
(cd docs && make html)
|
|
|
|
|
|
|
|
# run the test with physical cards
|
2018-07-19 21:31:39 +00:00
|
|
|
cd pysim-testdata
|
|
|
|
../tests/pysim-test.sh
|