Alexander Couzens | 4731232 | 2018-07-19 23:31:39 +0200 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | set -e |
| 4 | |
Harald Welte | 91d4ec7 | 2019-05-10 16:20:54 +0200 | [diff] [blame] | 5 | if [ ! -d "./pysim-testdata/" ] ; then |
Alexander Couzens | 4731232 | 2018-07-19 23:31:39 +0200 | [diff] [blame] | 6 | echo "###############################################" |
Harald Welte | 91d4ec7 | 2019-05-10 16:20:54 +0200 | [diff] [blame] | 7 | echo "Please call from pySim-prog top directory" |
Alexander Couzens | 4731232 | 2018-07-19 23:31:39 +0200 | [diff] [blame] | 8 | echo "###############################################" |
| 9 | exit 1 |
| 10 | fi |
| 11 | |
Daniel Willmann | de07b95 | 2020-10-19 10:32:34 +0200 | [diff] [blame] | 12 | virtualenv -p python3 venv --system-site-packages |
Alexander Couzens | 4731232 | 2018-07-19 23:31:39 +0200 | [diff] [blame] | 13 | . venv/bin/activate |
| 14 | pip install pytlv |
Philipp Maier | c5b422e | 2019-08-30 11:41:02 +0200 | [diff] [blame] | 15 | pip install pyyaml |
Harald Welte | b2edd14 | 2021-01-08 23:29:35 +0100 | [diff] [blame] | 16 | pip install cmd2 |
Harald Welte | 0d4e98a | 2021-04-07 00:14:40 +0200 | [diff] [blame] | 17 | pip install jsonpath-ng |
Alexander Couzens | 4731232 | 2018-07-19 23:31:39 +0200 | [diff] [blame] | 18 | |
Vadim Yanitskiy | 4ae7c49 | 2021-03-11 23:17:27 +0100 | [diff] [blame] | 19 | # Execute automatically discovered unit tests first |
Vadim Yanitskiy | d61da8a | 2021-03-12 01:13:05 +0100 | [diff] [blame] | 20 | python -m unittest discover -v -s tests/ |
Vadim Yanitskiy | 4ae7c49 | 2021-03-11 23:17:27 +0100 | [diff] [blame] | 21 | |
Harald Welte | 5da7a72 | 2021-04-03 20:21:02 +0200 | [diff] [blame] | 22 | # attempt to build documentation |
| 23 | pip install sphinx |
| 24 | pip install sphinxcontrib-napoleon |
Harald Welte | d36f694 | 2021-04-04 14:37:55 +0200 | [diff] [blame] | 25 | pip3 install -e 'git+https://github.com/osmocom/sphinx-argparse@master#egg=sphinx-argparse' |
Harald Welte | 5da7a72 | 2021-04-03 20:21:02 +0200 | [diff] [blame] | 26 | (cd docs && make html) |
| 27 | |
| 28 | # run the test with physical cards |
Alexander Couzens | 4731232 | 2018-07-19 23:31:39 +0200 | [diff] [blame] | 29 | cd pysim-testdata |
| 30 | ../tests/pysim-test.sh |