File: verify.py

package info (click to toggle)
ansible-core 2.19.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 32,944 kB
  • sloc: python: 181,408; cs: 4,929; sh: 4,661; xml: 34; makefile: 21
file content (23 lines) | stat: -rwxr-xr-x 584 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env python3
from __future__ import annotations

import os
import pathlib
import sys

exclude_programs = {
    'ansible-test',
}

bin_dir = pathlib.Path(os.environ['JUNIT_OUTPUT_DIR']).parent.parent.parent / 'bin'
programs = set(program.name for program in bin_dir.iterdir() if program.name not in exclude_programs)
docs_dir = pathlib.Path(sys.argv[1])
docs = set(path.with_suffix('').name for path in docs_dir.iterdir())

print('\n'.join(sorted(docs)))

missing = programs - docs
extra = docs - programs

if missing or extra:
    raise RuntimeError(f'{missing=} {extra=}')