chore: add testcapture and comments about test in parallel
This commit is contained in:
parent
5d5ae2d759
commit
baf281eddd
25
README.md
25
README.md
@ -184,6 +184,7 @@ Available recipes:
|
|||||||
run # [alias: ru]
|
run # [alias: ru]
|
||||||
runtest # [alias: rt]
|
runtest # [alias: rt]
|
||||||
test # [alias: t]
|
test # [alias: t]
|
||||||
|
testcapture # [alias: tc]
|
||||||
```
|
```
|
||||||
|
|
||||||
The following have different **recipes** for **macos** and **linux**
|
The following have different **recipes** for **macos** and **linux**
|
||||||
@ -217,7 +218,6 @@ BIN_APP_PATH := "/usr/local/bin"
|
|||||||
> [Command-line-options](#options) can be added
|
> [Command-line-options](#options) can be added
|
||||||
> RUST_LOG environment variable controls env_logger output
|
> RUST_LOG environment variable controls env_logger output
|
||||||
|
|
||||||
|
|
||||||
| Recipe | alias | Descripción | parameters |
|
| Recipe | alias | Descripción | parameters |
|
||||||
|--------|-------|--------------|--------------------|
|
|--------|-------|--------------|--------------------|
|
||||||
| **build** | b | run cargo | cargo arguments |
|
| **build** | b | run cargo | cargo arguments |
|
||||||
@ -228,9 +228,30 @@ BIN_APP_PATH := "/usr/local/bin"
|
|||||||
| **clean** | cl | run cargo clean | cargo arguments |
|
| **clean** | cl | run cargo clean | cargo arguments |
|
||||||
| **doc** | d | run cargo doc --open --no-deps | cargo arguments |
|
| **doc** | d | run cargo doc --open --no-deps | cargo arguments |
|
||||||
| **benchmark** | be | run cargo bench | cargo arguments |
|
| **benchmark** | be | run cargo bench | cargo arguments |
|
||||||
| **test*** | be | run cargo t | cargo arguments |
|
| **test*** | t | run cargo t | cargo arguments |
|
||||||
|
| **testcapure*** | tc | run cargo t -- --nocapture | cargo arguments |
|
||||||
| **runtest** | rt | run [run.sh](run.sh) script using [test](test) directories for **SOURCE** and **DEST** parametets <br> add [Command-line-options](#options) | |
|
| **runtest** | rt | run [run.sh](run.sh) script using [test](test) directories for **SOURCE** and **DEST** parametets <br> add [Command-line-options](#options) | |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### For tests
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> The logger can only be initialized once per process<br>
|
||||||
|
> Test by default runs in parallel
|
||||||
|
|
||||||
|
Use **--nocapture** to see the output even when tests pass
|
||||||
|
|
||||||
|
The **RUST_LOG** environment variable controls what gets logged
|
||||||
|
|
||||||
|
Log files are automatically cleaned up when the **TempDir** is dropped
|
||||||
|
|
||||||
|
The recommended way to test logging functionality:
|
||||||
|
- create a temporary log file
|
||||||
|
- write some messages
|
||||||
|
- verify their presence in the log
|
||||||
|
|
||||||
|
|
||||||
## To work on app
|
## To work on app
|
||||||
|
|
||||||
| Recipe | alias | Descripción | parameters |
|
| Recipe | alias | Descripción | parameters |
|
||||||
|
Loading…
x
Reference in New Issue
Block a user