[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] try_parse.sh: add a verbose mode and a meaningful exit code.



commit 51c2097586dd6133a862985ab68ded85736d40e8
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Wed Oct 9 09:31:10 2019 -0400

    try_parse.sh: add a verbose mode and a meaningful exit code.
---
 scripts/coccinelle/try_parse.sh | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/scripts/coccinelle/try_parse.sh b/scripts/coccinelle/try_parse.sh
index 865c85570..303324294 100755
--- a/scripts/coccinelle/try_parse.sh
+++ b/scripts/coccinelle/try_parse.sh
@@ -5,6 +5,8 @@
 
 top="$(dirname "$0")/../.."
 
+exitcode=0
+
 for fn in "$@"; do
 
     if spatch -macro_file_builtins "$top"/scripts/coccinelle/tor-coccinelle.h \
@@ -13,6 +15,13 @@ for fn in "$@"; do
         : # it's perfect
     else
         echo "$fn"
+        if test "${VERBOSE}" != ""; then
+            spatch -macro_file_builtins "$top"/scripts/coccinelle/tor-coccinelle.h \
+                   -I "$top" -I "$top"/src -I "$top"/ext --parse-c "$fn"
+        fi
+        exitcode=1
     fi
 
 done
+
+exit "$exitcode"



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits