commit 8a3cfb57e1982d26bafe6289f8ed9dea47192604 Author: Damian Johnson atagar@torproject.org Date: Wed Jan 30 08:53:06 2013 -0800
Checking for 2to3 and python3 when needed
Warning the user if 2to3 or python3 aren't in our PATH when the user provides the '--python3' testing argument. --- run_tests.py | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/run_tests.py b/run_tests.py index 9604731..d18ec9d 100755 --- a/run_tests.py +++ b/run_tests.py @@ -412,6 +412,13 @@ if __name__ == '__main__':
load_user_configuration(test_config)
+ # check that we have 2to3 and python3 available in our PATH + if CONFIG["argument.python3"]: + for required_cmd in ("2to3", "python3"): + if not system.is_available(required_cmd): + test.output.print_line("Unable to test python 3 because %s isn't in your path" % required_cmd, *test.runner.ERROR_ATTR) + sys.exit(1) + if CONFIG["argument.python3"] and sys.version_info.major != 3: python3_destination = os.path.join(CONFIG["integ.test_directory"], "python3")
tor-commits@lists.torproject.org