blob: dc2692c3cdbea03a2a74ecc51f88bd8c477f1963 [file] [log] [blame]
Alexander Couzens47312322018-07-19 23:31:39 +02001#!/bin/sh
2
3set -e
4
Harald Welte91d4ec72019-05-10 16:20:54 +02005if [ ! -d "./pysim-testdata/" ] ; then
Alexander Couzens47312322018-07-19 23:31:39 +02006 echo "###############################################"
Harald Welte91d4ec72019-05-10 16:20:54 +02007 echo "Please call from pySim-prog top directory"
Alexander Couzens47312322018-07-19 23:31:39 +02008 echo "###############################################"
9 exit 1
10fi
11
Daniel Willmannde07b952020-10-19 10:32:34 +020012virtualenv -p python3 venv --system-site-packages
Alexander Couzens47312322018-07-19 23:31:39 +020013. venv/bin/activate
14pip install pytlv
Philipp Maierc5b422e2019-08-30 11:41:02 +020015pip install pyyaml
Harald Welteb2edd142021-01-08 23:29:35 +010016pip install cmd2
Harald Welte0d4e98a2021-04-07 00:14:40 +020017pip install jsonpath-ng
Harald Weltee0f9ef12021-04-10 17:22:35 +020018pip install construct
Alexander Couzens47312322018-07-19 23:31:39 +020019
Vadim Yanitskiy4ae7c492021-03-11 23:17:27 +010020# Execute automatically discovered unit tests first
Vadim Yanitskiyd61da8a2021-03-12 01:13:05 +010021python -m unittest discover -v -s tests/
Vadim Yanitskiy4ae7c492021-03-11 23:17:27 +010022
Harald Welte5da7a722021-04-03 20:21:02 +020023# attempt to build documentation
24pip install sphinx
25pip install sphinxcontrib-napoleon
Harald Welted36f6942021-04-04 14:37:55 +020026pip3 install -e 'git+https://github.com/osmocom/sphinx-argparse@master#egg=sphinx-argparse'
Harald Welte5da7a722021-04-03 20:21:02 +020027(cd docs && make html)
28
29# run the test with physical cards
Alexander Couzens47312322018-07-19 23:31:39 +020030cd pysim-testdata
31../tests/pysim-test.sh