Index: chrome/test/functional/pyauto_functional.py |
diff --git a/chrome/test/functional/pyauto_functional.py b/chrome/test/functional/pyauto_functional.py |
index 1937a089e9559ab2502ad89271282f2943619d30..3b8787c224f91da66b96cce098b87f8f256e409e 100755 |
--- a/chrome/test/functional/pyauto_functional.py |
+++ b/chrome/test/functional/pyauto_functional.py |
@@ -66,7 +66,13 @@ def RunWithCorrectPythonIfNecessary(): |
sys.exit(proc.returncode) |
# Check this is the right python version. |
- if sys.version_info[0:2] != (2, 6): |
+ # Also check the environment variable DO_NOT_RESTART_PYTHON_FOR_PYAUTO. If |
+ # it is set to TRUE (case-insensitive), then do not run RunAgain() regardless |
+ # what current python version is. |
+ |
+ if (sys.version_info[0:2] != (2, 6) and |
+ (os.getenv('DO_NOT_RESTART_PYTHON_FOR_PYAUTO') is None or |
+ os.getenv('DO_NOT_RESTART_PYTHON_FOR_PYAUTO').upper() != 'TRUE')): |
RunAgain() |
# Check this is the right bitness on mac. |