run_pyversion_tests.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 """Runs the tornado test suite with all supported python interpreters."""
00003 
00004 from __future__ import absolute_import, division, with_statement
00005 
00006 import os
00007 import subprocess
00008 import sys
00009 
00010 INTERPRETERS = [
00011     "python2.5",
00012     "python2.6",
00013     "python2.7",
00014     "auto2to3",
00015     "pypy",
00016     ]
00017 
00018 
00019 def exists_on_path(filename):
00020     for dir in os.environ["PATH"].split(":"):
00021         if os.path.exists(os.path.join(dir, filename)):
00022             return True
00023     return False
00024 
00025 
00026 def main():
00027     for interpreter in INTERPRETERS:
00028         print "=================== %s =======================" % interpreter
00029         if not exists_on_path(interpreter):
00030             print "Interpreter not found, skipping..."
00031             continue
00032         args = [interpreter, "-m", "tornado.test.runtests"] + sys.argv[1:]
00033         ret = subprocess.call(args)
00034         if ret != 0:
00035             print "Tests on %s failed with exit code %d" % (interpreter, ret)
00036             sys.exit(ret)
00037     print "All tests passed"
00038 
00039 if __name__ == "__main__":
00040     main()


rosbridge_server
Author(s): Jonathan Mace
autogenerated on Thu Jan 2 2014 11:53:55