Files
NowChessSystems/jacoco-reporter/test_counter.py
T

10 lines
371 B
Python

import glob,re,os
rows=[]
for f in glob.glob('modules/*/build/test-results/test/TEST-*.xml'):
txt=open(f,encoding='utf-8').read(500)
m1=re.search(r'name="([^"]+)"',txt)
m2=re.search(r'tests="(\d+)"',txt)
if m1 and m2:
rows.append((int(m2.group(1)),f,m1.group(1)))
for n,f,name in sorted(rows, reverse=True)[:20]:
print(f'{n:3} {name} ({f})')