test script: Tell cargo which package has the tests

This commit is contained in:
Max Brunsfeld 2019-02-07 12:28:48 -08:00
parent 108ca989ea
commit 7f66d2406f

View file

@ -76,8 +76,8 @@ else
fi
if [[ "${mode}" == "debug" ]]; then
test_binary=$(cargo test --no-run --message-format=json 2> /dev/null | jq -rs '.[-1].filenames[0]')
lldb "${test_binary}" -- $top_level_filter
test_binary=$(cargo test --no-run --package=tree-sitter-cli --lib --message-format=json 2> /dev/null | jq -rs '.[-1].filenames[0]')
lldb "${test_binary}" -- "${top_level_filter}"
else
cargo test --jobs 1 $top_level_filter -- --nocapture
cargo test --package=tree-sitter-cli --lib --jobs 1 $top_level_filter -- --nocapture
fi