Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions scripts/test.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#!/bin/sh

test_names=$(git status -s | grep tests/ | sed -e 's/.* //' -e 's/tests\//--test /' -e 's/.rs//' | tr '\n' ' ')

clear
cargo test
cargo test --features postgresql
cargo test --features sqlite
cargo test $test_names
cargo test $test_names --features postgresql
cargo test $test_names --features sqlite

# run only one test
# cargo test --features sqlite --test name_of_the_test_file name_of_the_test -- --nocapture --color always
1 change: 0 additions & 1 deletion scripts/watch_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@ esac

[ ! -z "$features" ] && features="--features $features"

# cargo watch -w ./src -w ./tests -x 'test --features postgresql -- --nocapture --color always'
cargo watch -w ./src -w ./tests -x "test $features $test_names"
Loading