Skip to content

Commit

Permalink
Don't use valgrind to run query tests
Browse files Browse the repository at this point in the history
The query tests always hang at a `memmove` under
`ts_query__analyze_patterns`, for some reason. From my testing, this
doesn't seem to be related to any hangs during highlighting in the IDE.
This has to be investigated more but for now we just don't use valgrind
for the query tests.
  • Loading branch information
alex-pinkus committed Jan 2, 2022
1 parent 8459a6e commit 81f4170
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions scripts/test-with-memcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,17 @@ if [[ "$1" == "--install-valgrind" ]]; then
shift
fi

# Query tests hang forever when run with valgrind, so move them out of
# the way.
mv ./queries ./queries.bak
trap "mv ./queries.bak ./queries || true" EXIT

valgrind tree-sitter test

# Now move the query tests back, and move the corpus tests out of the
# way.
mv ./queries.bak ./queries
mv ./corpus ./corpus.bak
trap "mv ./corpus.bak ./corpus || true" EXIT

tree-sitter test

0 comments on commit 81f4170

Please sign in to comment.