Ensure the test suite is executed against the local tornado modules. #545

Closed
wants to merge 5 commits into
from
View
@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+#
+# Execute the entire tornado test suite and ensure the local tornado
+# modules are imported rather than the system wide packages.
+#
+
+# Retrieve the absolute path of the root tornado directory
+# in which this script is located.
+SOURCE="${BASH_SOURCE[0]}"
+while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
+TORNADO_ROOT_DIR="$( cd -P "$( dirname "$SOURCE" )/../" && pwd )"
+
+# Change directory to the root tornado directory
+cd $TORNADO_ROOT_DIR
+
+# Execute the entire test suite script as a module.
+# All arguments passed to this script will be passed along to the
+# tornado.test.runtests module.
+python -m tornado.test.runtests $*
View
@@ -388,9 +388,9 @@ def main():
be overridden by naming a single test on the command line::
# Runs all tests
- tornado/test/runtests.py
+ tornado/runtests
# Runs one test
- tornado/test/runtests.py tornado.test.stack_context_test
+ tornado/runtests tornado.test.stack_context_test
"""
from tornado.options import define, options, parse_command_line