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.
 
 
 

34 lines
1.1 KiB

  1. #!/usr/bin/env python
  2. """
  3. The main purpose of this file is to run tox only with the current existing python interpretors.
  4. """
  5. import os
  6. import sys
  7. import logging
  8. if __name__ == "__main__":
  9. log = logging.getLogger()
  10. # now we'll detect which python interpretors we have on this machine and run the tests for all of them
  11. #'python2.5':'py25',
  12. known_pys = { 'python2.6':'py26', 'python2.7':'py27' } # ,'python3':'py3', 'python3.2':'py32', 'python4':'py4'}
  13. #known_pys = { 'python2.7':'py27' } # ,'python3':'py3', 'python3.2':'py32', 'python4':'py4'}
  14. detected_pys = set()
  15. for known_py in known_pys:
  16. if os.system("which %s >/dev/null" % known_py) == 0:
  17. detected_pys.add(known_pys[known_py])
  18. #detected_pys.add('docs')
  19. #os.system("python setup.py test")
  20. cmds = ["autopep8 --ignore=E501 -i *.py tendo/*.py demo/*.py",
  21. #"pep8",
  22. "./tox -e %s" % ",".join(detected_pys)]
  23. for cmd in cmds:
  24. if os.system(cmd) != 0:
  25. print("ERROR: Command `%s` failed, testing stopped here." % cmd)
  26. sys.exit(6)