Improve rake tasks for specs

- clean coverage directory before running specs to avoid simplecov
  slowdowns
- add valgrind task to run valgrind; normal spec does not run it
This commit is contained in:
josh committed 2026-08-19 09:24:03 -04:00
1 parent 8c92d442bb
commit 6c66c90426
2 files changed
+12 -2

No files matched your search

+1 -1
View File
@@ -119,7 +119,7 @@ EOF
results = Results.new(stdout, stderr, status)
# Valgrind is only reliably available on Linux, so limit the leak check to
# Linux platforms.
if RUBY_PLATFORM =~ /linux/
if RUBY_PLATFORM =~ /linux/ && ENV["spec-valgrind"]
stdout, stderr, status = Open3.capture3("valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose spec/run/testparser")
vgout = stdout + stderr
File.binwrite("spec/run/.vgout", vgout)