Adjusted README

This commit is contained in:
2025-12-05 08:32:45 +01:00
parent d23ac3a634
commit 3cad793e78

View File

@@ -70,7 +70,7 @@ in turn imports `ioc/config.cmd` to get the current configuration.
### General
Running tests requires the following three steps:
- Starting the IOC via `ioc/startioc.py` (see [Configuration](#starting-the-ioc))
- Starting the IOC via `ioc/startioc` (see [Configuration](#starting-the-ioc))
- Creating (if not done previously) and activating a suitable virtual environment:
```bash
./maketestenv
@@ -78,24 +78,24 @@ source testenv/bin/activate
```
- Running the desired test(s) via pytest. For example:
```bash
pytest tests/sinqMotor/turboPmac/
pytest tests/turboPmac1/
```
This runs all Turbo PMAC tests within the directory.
To run a specific test file:
```bash
pytest tests/sinqMotor/turboPmac/lin1/test_common.py
pytest tests/turboPmac1/ax1/test_common.py
```
And to run a specific test "test_something" within this file:
```bash
pytest tests/sinqMotor/turboPmac/lin1/test_common.py -k 'test_something'
pytest tests/turboPmac1/ax1/test_common.py -k 'test_something'
```
Pytest normally suppresses stdout (which is where Pythons `print` writes by default).
To show it, use the `-s` flag:
```bash
pytest -s tests/sinqMotor/turboPmac/lin1/test_common.py -k 'test_something'
pytest -s tests/turboPmac1/ax1/test_common.py -k 'test_something'
```
### Parallelizing tests over motors
@@ -109,8 +109,8 @@ The individual tests for each motor are run sequentially.
If a folder is given as an argument, all tests which are not within this folder are ignored.
- `runtests` will run all tests parallelized per motor
- `runtests tests/sinqMotor/turboPmac` will run all Turbo PMAC tests parallelized per motor
- `runtests tests/sinqMotor/turboPmac/ax1` will only run the tests for motor `ax1`. These tests are run sequentially.
- `runtests tests/turboPmac1` will run all Turbo PMAC tests parallelized per motor
- `runtests tests/turboPmac1/ax1` will only run the tests for motor `ax1`. These tests are run sequentially.
In addition to the parallelization feature, `runtests` also starts the IOC if it is not running already.