rosdep_formatting_test.py 687 B

123456789101112131415161718192021222324
  1. #!/usr/bin/env python
  2. import os
  3. from scripts.check_rosdep import main as check_rosdep
  4. from .fold_block import Fold
  5. def test():
  6. files = os.listdir('rosdep')
  7. with Fold() as fold:
  8. print("""Running 'scripts/check_rosdep.py' on all '*.yaml' in the 'rosdep' directory.
  9. If this fails you can run 'scripts/clean_rosdep_yaml.py' to help cleanup.
  10. """)
  11. for f in sorted(files):
  12. fname = os.path.join('rosdep', f)
  13. if not f.endswith('.yaml'):
  14. print("Skipping rosdep check of file %s" % fname)
  15. continue
  16. print("Checking rosdep file: %s" % fname)
  17. assert check_rosdep(fname), fold.get_message()