Merge branch 'master' into node-fields
This commit is contained in:
commit
5035e194ff
34 changed files with 1178 additions and 240 deletions
11
script/test
11
script/test
|
|
@ -67,7 +67,7 @@ while getopts "dDghl:e:s:t:" option; do
|
|||
esac
|
||||
done
|
||||
|
||||
shift $(expr $OPTIND - 1 )
|
||||
shift $(expr $OPTIND - 1)
|
||||
|
||||
if [[ -n $TREE_SITTER_TEST_LANGUAGE_FILTER || -n $TREE_SITTER_TEST_EXAMPLE_FILTER || -n $TREE_SITTER_TEST_TRIAL_FILTER ]]; then
|
||||
top_level_filter=corpus
|
||||
|
|
@ -76,8 +76,11 @@ else
|
|||
fi
|
||||
|
||||
if [[ "${mode}" == "debug" ]]; then
|
||||
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}"
|
||||
test_binary=$(
|
||||
cargo test -p tree-sitter-cli --no-run --message-format=json 2> /dev/null |\
|
||||
jq -rs 'map(select(.target.name == "tree-sitter-cli" and .executable))[0].executable'
|
||||
)
|
||||
lldb "${test_binary}" -- $top_level_filter
|
||||
else
|
||||
cargo test --package=tree-sitter-cli --lib --jobs 1 $top_level_filter -- --nocapture
|
||||
cargo test -p tree-sitter-cli --jobs 1 $top_level_filter -- --nocapture
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -4,5 +4,5 @@ setlocal
|
|||
set TREE_SITTER_TEST=1
|
||||
set RUST_TEST_THREADS=1
|
||||
set RUST_BACKTRACE=full
|
||||
cargo test "%~1" -- --nocapture
|
||||
cargo test -p tree-sitter-cli "%~1" -- --nocapture
|
||||
endlocal
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue