Commit 018c93bb authored by Savvas Etairidis's avatar Savvas Etairidis Committed by oroulet

feat: improve run-tests.sh

parent 863f18a4
......@@ -196,11 +196,21 @@ All protocol code is under opcua directory
## Running tests:
```
python -m pip install -r requirements.txt
python -m pip install -r dev_requirements.txt
pytest -v -s
```
Or
```
./run-test.sh -v -s
```
## Coverage
```
pytest -v -s --cov asyncua --cov-report=html
```
Or
```
./run-test.sh -v -s --cov asyncua --cov-report=html
```
#!/bin/sh
pytest
#!/bin/sh -e
# Check if virtualenv is available and if it is use it
if command -v virtualenv; then
# Create a virtual venv in order not to pollute
# the main python libs if the venv already
# exist no harm is done
virtualenv -p python3 venv
. venv/bin/activate
# install requirements
python3 -m pip install -r requirements.txt
python3 -m pip install -r dev_requirements.txt
# Execute pytest and pass along the arguments
# used to call this script
pytest $@
else
echo "virtualenv not installed"
# Execute pytest and pass along the arguments
# used to call this script
pytest $@
fi
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment