summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2023-03-16 17:29:12 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2023-03-16 17:29:12 (GMT)
commit5655318f50b3bc51f8cba32759e01ae8c7694cc9 (patch)
tree00a3c065ecacd8eaed206f6dda391d4e9c82c54b /tools
parenta3c59e320df775f0d6849e5d3163292280b3b386 (diff)
parentae0471127efb9e3be2f45c25f91ba07f6a09eae5 (diff)
downloadtcl-5655318f50b3bc51f8cba32759e01ae8c7694cc9.zip
tcl-5655318f50b3bc51f8cba32759e01ae8c7694cc9.tar.gz
tcl-5655318f50b3bc51f8cba32759e01ae8c7694cc9.tar.bz2
Merge 8.7
Diffstat (limited to 'tools')
-rw-r--r--tools/valgrind_check_success30
1 files changed, 30 insertions, 0 deletions
diff --git a/tools/valgrind_check_success b/tools/valgrind_check_success
new file mode 100644
index 0000000..24830d5
--- /dev/null
+++ b/tools/valgrind_check_success
@@ -0,0 +1,30 @@
+#! /usr/bin/env tclsh
+
+
+proc main {sourcetype source} {
+ switch $sourcetype {
+ file {
+ set chan [open $source]
+ try {
+ set data [read $chan]
+ } finally {
+ close $chan
+ }
+ }
+ string {
+ set data $source
+ }
+ default {
+ error [list {wrong # args}]
+ }
+ }
+ set found [regexp -inline -all {blocks are\
+ (?:(?:(?:definitely|indirectly|possibly) lost)|still reachable)} $data]
+ if {[llength $found]} {
+ puts 0
+ } else {
+ puts 1
+ }
+ flush stdout
+}
+main {*}$argv