mesonbuild/scripts/test_loaded_modules.py
raw| 1 | from __future__ import annotations |
| 2 | |
| 3 | import sys |
| 4 | import json |
| 5 | import typing as T |
| 6 | |
| 7 | from . import meson_exe |
| 8 | |
| 9 | # This script is used by run_unittests.py to verify we don't load too many |
| 10 | # modules when executing a wrapped command. |
| 11 | def run(args: T.List[str]) -> int: |
| 12 | meson_exe.run(args) |
| 13 | print(json.dumps(list(sys.modules.keys()))) |
| 14 | return 0 |