From ff8dd3197e951f100a76e93f67db98153ede81df Mon Sep 17 00:00:00 2001 From: peusterm Date: Wed, 16 May 2018 16:35:17 +0200 Subject: [PATCH] Improved test triggers for unit tests. Change-Id: Ib3a886da8a6f181fc04f4b6b4a42230deac79d4d Signed-off-by: peusterm --- README.md | 4 ++-- devops-stages/stage-test.sh | 6 ++++-- pytest.ini | 3 +++ 3 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 pytest.ini diff --git a/README.md b/README.md index 0c59264..e471c9e 100755 --- a/README.md +++ b/README.md @@ -132,8 +132,8 @@ Please check [this OSM wiki page](https://osm.etsi.org/wikipub/index.php/Workflo To run the unit tests do: * `cd ~/vim-emu` -* `sudo py.test -v src/emuvim/test/unittests` -(To force Python2: `python2 -m pytest -v src/emuvim/test/unittests`) +* `sudo pytest -v` +* (To force Python2: `sudo python2 -m pytest -v`) ## Seed code contributors: diff --git a/devops-stages/stage-test.sh b/devops-stages/stage-test.sh index 10dbe02..3228a0d 100755 --- a/devops-stages/stage-test.sh +++ b/devops-stages/stage-test.sh @@ -38,10 +38,12 @@ docker pull 'ubuntu:trusty' # debugging echo "Tests executed inside: $(hostname)" echo "Tests executed by user: $(whoami)" -# trigger the tests cd /son-emu/ -py.test -v src/emuvim/test/unittests # trigger pep8 style check echo "Doing flake8 style check ..." flake8 --exclude=.eggs,devops --ignore=E501 . echo "done." +# trigger the tests +echo "Running unit tests ..." +pytest -v +echo "done." diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000..137eee5 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,3 @@ +[pytest] +addopts = --ignore devops +log_level = DEBUG -- 2.25.1