diff options
Diffstat (limited to 'tools/run_tests/sanity/check_tracer_sanity.py')
-rwxr-xr-x | tools/run_tests/sanity/check_tracer_sanity.py | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/tools/run_tests/sanity/check_tracer_sanity.py b/tools/run_tests/sanity/check_tracer_sanity.py index 997ec79d02..c4c76530de 100755 --- a/tools/run_tests/sanity/check_tracer_sanity.py +++ b/tools/run_tests/sanity/check_tracer_sanity.py @@ -26,21 +26,22 @@ errors = 0 tracers = [] pattern = re.compile("GRPC_TRACER_INITIALIZER\((true|false), \"(.*)\"\)") for root, dirs, files in os.walk('src/core'): - for filename in files: - path = os.path.join(root, filename) - if os.path.splitext(path)[1] != '.c': continue - with open(path) as f: - text = f.read() - for o in pattern.findall(text): - tracers.append(o[1]) + for filename in files: + path = os.path.join(root, filename) + if os.path.splitext(path)[1] != '.c': continue + with open(path) as f: + text = f.read() + for o in pattern.findall(text): + tracers.append(o[1]) with open('doc/environment_variables.md') as f: - text = f.read() + text = f.read() for t in tracers: if t not in text: - print("ERROR: tracer \"%s\" is not mentioned in doc/environment_variables.md" % t) + print( + "ERROR: tracer \"%s\" is not mentioned in doc/environment_variables.md" + % t) errors += 1 - assert errors == 0 |