make tasks to test at nproc / 2, which minimizes cpu thrashing

closes #17

Signed-off-by: Erik Hollensbe <git@hollensbe.org>
This commit is contained in:
Erik Hollensbe 2022-02-18 07:59:40 -08:00
parent 09ace2222d
commit 1167e36ead
No known key found for this signature in database
GPG key ID: 4BB0E241A863B389
2 changed files with 21 additions and 2 deletions

View file

@ -4,7 +4,12 @@ postgres: stop-postgres
stop-postgres:
docker rm -f acmed-postgres || :
run-with-backtrace:
RUST_BACKTRACE=1 rustup run nightly cargo run
CARGO_TEST=cargo test -- --test-threads $$(($$(nproc) / 2))
test:
${CARGO_TEST}
debug-test:
DEBUG=1 cargo test -- --nocapture --test-threads $$(($$(nproc) / 2))
.PHONY: postgres stop-postgres

View file

@ -53,10 +53,24 @@ psql -U postgres -h localhost coyote
`docker` is required to run the tests. The tests take around 70 seconds to run on a 5900X and use all 24 threads most of the test runtime. Be mindful of the time they take, especially when running them on a slower system.
If you like full throttle:
```
cargo test
```
Add `DEBUG=1` for verbose test logging.
If you'd like tests that don't punish your processor, you can run:
```
make test
# or
make debug-test
```
To accomplish the same using roughly only half of the CPU time.
## Task List
### JOSE/ACME Protocols: