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.
 
 
 

38 lines
1008 B

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