blob: f83e6a5390c952cc54b91b637fc9b268ecbfa812 [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
Alexander Couzens47312322018-07-19 23:31:39 +020018
Vadim Yanitskiy4ae7c492021-03-11 23:17:27 +010019# Execute automatically discovered unit tests first
Vadim Yanitskiyd61da8a2021-03-12 01:13:05 +010020python -m unittest discover -v -s tests/
Vadim Yanitskiy4ae7c492021-03-11 23:17:27 +010021
Harald Welte5da7a722021-04-03 20:21:02 +020022# attempt to build documentation
23pip install sphinx
24pip install sphinxcontrib-napoleon
Harald Welted36f6942021-04-04 14:37:55 +020025pip3 install -e 'git+https://github.com/osmocom/sphinx-argparse@master#egg=sphinx-argparse'
Harald Welte5da7a722021-04-03 20:21:02 +020026(cd docs && make html)
27
28# run the test with physical cards
Alexander Couzens47312322018-07-19 23:31:39 +020029cd pysim-testdata
30../tests/pysim-test.sh