No Description

check_clean.py 975B

1234567891011121314151617181920212223242526272829303132333435
  1. #!/usr/bin/python
  2. import unittest as u
  3. import re, fnmatch, os
  4. rootDir = '../build/src/'
  5. swigtypeStr = 'SWIGTYPE'
  6. class Clean(u.TestCase):
  7. def test_existing_swigtype(self):
  8. unclean = []
  9. for dirName in os.listdir(rootDir):
  10. dirPath = os.path.join(rootDir, dirName)
  11. if not os.path.isdir(dirPath):
  12. continue
  13. ok = True
  14. for subdir, dirs, files in os.walk(dirPath):
  15. if not ok:
  16. break
  17. for fileName in files:
  18. if swigtypeStr in fileName:
  19. unclean.append(dirName)
  20. ok = False
  21. break
  22. self.assertEqual( len(unclean), 0,
  23. "\nThe following modules have unclean Java bindings:\n" + \
  24. "\n".join(unclean) + "\n\n" + \
  25. "Consider adding them to the SWIGJAVA blacklist")
  26. if __name__ == '__main__':
  27. u.main()