Avoid running the slow benchmark tests during regular testing

This commit is contained in:
Tony Garnock-Jones 2020-06-17 03:05:32 +02:00
parent 89c3171758
commit 6cfb474a6f
1 changed files with 6 additions and 4 deletions

View File

@ -1,6 +1,8 @@
TESTARGS=--lib --bins --examples --tests
# cargo install cargo-watch # cargo install cargo-watch
watch: watch:
cargo watch -c -x 'test --all-targets -- --nocapture' cargo watch -c -x 'test $(TESTARGS) -- --nocapture'
bench: benches/testdata.bin bench: benches/testdata.bin
cargo bench --benches cargo bench --benches
@ -10,11 +12,11 @@ benches/testdata.bin: benches/testdata.bin.gz
gzip -dc $< > $@ gzip -dc $< > $@
clippy-watch: clippy-watch:
cargo watch -c -x 'clippy --all-targets' cargo watch -c -x 'clippy $(TESTARGS)'
inotifytest: inotifytest:
inotifytest sh -c 'reset; cargo build --all-targets && RUST_BACKTRACE=1 cargo test --all-targets -- --nocapture' inotifytest sh -c 'reset; cargo build $(TESTARGS) && RUST_BACKTRACE=1 cargo test $(TESTARGS) -- --nocapture'
debug-tests: debug-tests:
cargo test --all-targets --no-run cargo test $(TESTARGS) --no-run
gdb --args $$(cargo test 3>&1 1>&2 2>&3 3>&- | grep Running | awk '{print $$2}') --test-threads=1 gdb --args $$(cargo test 3>&1 1>&2 2>&3 3>&- | grep Running | awk '{print $$2}') --test-threads=1