2 from catkin.find_in_workspaces
import find_in_workspaces
3 import zipfile_interface
4 from roscompile
import get_functions
7 parser = argparse.ArgumentParser()
8 parser.add_argument(
'zipfile', nargs=
'?')
9 args = parser.parse_args()
12 args.zipfile = find_in_workspaces(path=
'roscompile/test/test_data.zip', first_match_only=
True)[0]
13 config, cases = zipfile_interface.get_test_cases(args.zipfile)
17 for name
in roscompile_functions:
18 coverage_counts[name] = 0
19 max_len = max(max_len, len(name))
21 for test_config
in config:
22 for fne_name
in test_config[
'functions']:
23 coverage_counts[fne_name] += 1
26 for name, count
in sorted(coverage_counts.items(), key=
lambda kv: kv[1], reverse=
True):
27 print(
'{:{}} {:=3d}'.format(name, max_len, count))
32 print(
'Zero tests written for {} functions'.format(z_count))