aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/run_tests/sanity/check_tracer_sanity.py
diff options
context:
space:
mode:
authorGravatar Noah Eisen <ncteisen@gmail.com>2017-12-12 17:19:18 -0800
committerGravatar GitHub <noreply@github.com>2017-12-12 17:19:18 -0800
commit438f219701a0d4e41060142a5a5db0d828eeeb3f (patch)
treef3d876edec2c08a53f242143763bc39ab72ca3a2 /tools/run_tests/sanity/check_tracer_sanity.py
parent69e8ab400dadb2843e9a1927cf579bdec94d729b (diff)
parentc47c58971bfd838843befed66430e87b77eab4fb (diff)
Merge pull request #13719 from ncteisen/yapf-tools
Yapf tools/
Diffstat (limited to 'tools/run_tests/sanity/check_tracer_sanity.py')
-rwxr-xr-xtools/run_tests/sanity/check_tracer_sanity.py21
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