You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

43 lines
1.0 KiB

  1. #!/usr/bin/env python
  2. ############################################################################
  3. # Joshua R. Boverhof, David W. Robertson, LBNL
  4. # See LBNLCopyright for copyright notice!
  5. ###########################################################################
  6. import unittest
  7. import tarfile
  8. import os
  9. import ConfigParser
  10. import test_wsdl
  11. SECTION = 'files'
  12. CONFIG_FILE = 'config.txt'
  13. def extractFiles(section, option):
  14. config = ConfigParser.ConfigParser()
  15. config.read(CONFIG_FILE)
  16. archives = config.get(section, option)
  17. archives = eval(archives)
  18. for file in archives:
  19. tar = tarfile.open(file)
  20. if not os.access(tar.membernames[0], os.R_OK):
  21. for i in tar.getnames():
  22. tar.extract(i)
  23. def makeTestSuite():
  24. suite = unittest.TestSuite()
  25. suite.addTest(test_wsdl.makeTestSuite("services_by_file"))
  26. return suite
  27. def main():
  28. extractFiles(SECTION, 'archives')
  29. unittest.main(defaultTest="makeTestSuite")
  30. if __name__ == "__main__":
  31. main()