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.
 
 
 

40 lines
1.1 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, tarfile, os, ConfigParser
  7. import test_wsdl
  8. import utils
  9. SECTION='files'
  10. CONFIG_FILE = 'config.py'
  11. def extractFiles(section, option):
  12. config = ConfigParser.ConfigParser()
  13. config.read(CONFIG_FILE)
  14. archives = config.get(section, option)
  15. archives = eval(archives)
  16. for file in archives:
  17. tar = tarfile.open(file)
  18. if not os.access(tar.membernames[0], os.R_OK):
  19. for i in tar.getnames():
  20. tar.extract(i)
  21. def makeTestSuite():
  22. suite = unittest.TestSuite()
  23. suite.addTest(test_wsdl.makeTestSuite("services_by_file"))
  24. return suite
  25. def main():
  26. extractFiles(SECTION, 'archives')
  27. loader = utils.MatchTestLoader(True, None, "makeTestSuite")
  28. unittest.main(defaultTest="makeTestSuite", testLoader=loader)
  29. if __name__ == "__main__" : main()