From a1b3a4d35105de63f08745ef0a4cce33964a971c Mon Sep 17 00:00:00 2001 From: Gereon Kremer Date: Tue, 22 Mar 2022 21:33:11 +0100 Subject: [PATCH] Make uncovered-api-functions.py exit with 1 if something is not covered (#8360) This simplifies the integration of this script in CI or buildbot jobs. The idea is to automatically check that the whole API is covered by unit tests, and that the language bindings do the same. --- contrib/uncovered-api-functions.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contrib/uncovered-api-functions.py b/contrib/uncovered-api-functions.py index 17659fc21..a3b152e15 100755 --- a/contrib/uncovered-api-functions.py +++ b/contrib/uncovered-api-functions.py @@ -3,6 +3,7 @@ import json import re import subprocess +import sys def demangle(name): @@ -42,3 +43,6 @@ if __name__ == "__main__": print('starting in {filename}:{startline}'.format(**nc)) print('function {function}'.format(**nc)) print('') + if notcovered: + sys.exit(1) + sys.exit(0) -- 2.30.2