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.
 
 
 

24 lines
601 B

  1. #!/usr/bin/env python
  2. import unittest, tarfile, os, ConfigParser
  3. import test_t1
  4. SECTION='files'
  5. CONFIG_FILE = 'config.py'
  6. def main():
  7. config = ConfigParser.ConfigParser()
  8. config.read(CONFIG_FILE)
  9. archives = config.get(SECTION, 'archives')
  10. archives = eval(archives)
  11. test_t1.CONFIG = config
  12. for file in archives:
  13. tar = tarfile.open(file)
  14. if not os.access(tar.membernames[0], os.R_OK):
  15. for i in tar.getnames():
  16. tar.extract(i)
  17. unittest.TestProgram(defaultTest='test_t1.makeStandAloneSuite')
  18. if __name__ == "__main__" : main()