From 83561530fa3ad38e7993dcd880b6cf8ee19313d3 Mon Sep 17 00:00:00 2001 From: bneradt Date: Thu, 13 Aug 2020 16:03:41 +0000 Subject: [PATCH] Updating our autest suite to require Python3.6 AuTest 1.8.1, which we require (see tests/Pipfile), uses features new to Python 3.6 such as type hints. We therefore already have required 3.6 for a few weeks. This just updates our scripts to enforce this. --- tests/README.md | 2 +- tests/gold_tests/autest-site/init.cli.ext | 6 +++--- tests/test-env-check.sh | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/README.md b/tests/README.md index 8dd8567fbd0..bff29e9fa13 100644 --- a/tests/README.md +++ b/tests/README.md @@ -44,7 +44,7 @@ To run autest manually, the recommended way is to follow these steps: AuTest and the relevant tools can be install manually instead of using the wrapper script. By doing this, it is often easier to debug issues with the testing system, or the tests. There are two ways this can be done. 1. Run the bootstrap script then source the path with a "source ./env-test/bin/activate" command. At this point autest command should run without the wrapper script -2. Make sure you install python 3.5 or better on your system. From there install these python packages ( ie pip install ): +2. Make sure you install python 3.6 or better on your system. From there install these python packages ( ie pip install ): - hyper - git+https://bitbucket.org/autestsuite/reusable-gold-testing-system.git - [traffic-replay](https://bitbucket.org/autestsuite/trafficreplay/src/master/) (This will automatically install [MicroDNS](https://bitbucket.org/autestsuite/microdns/src/master/), [MicroServer](https://bitbucket.org/autestsuite/microserver/src/master/), [TrafficReplayLibrary](https://bitbucket.org/autestsuite/trafficreplaylibrary/src/master/), and dnslib as part of the dependencies.) diff --git a/tests/gold_tests/autest-site/init.cli.ext b/tests/gold_tests/autest-site/init.cli.ext index 1ca749e85ae..8b6a647b95d 100644 --- a/tests/gold_tests/autest-site/init.cli.ext +++ b/tests/gold_tests/autest-site/init.cli.ext @@ -18,11 +18,11 @@ import sys -if sys.version_info < (3, 5, 0): +if sys.version_info < (3, 6, 0): host.WriteError( - "You need python 3.5 or later to run these tests\n", show_stack=False) + "You need python 3.6 or later to run these tests\n", show_stack=False) -autest_version = "1.7.2" +autest_version = "1.8.1" if AuTestVersion() < autest_version: host.WriteError( "Tests need AuTest version {ver} or better\n Please update AuTest:\n pip install --upgrade autest\n".format(ver=autest_version), show_stack=False) diff --git a/tests/test-env-check.sh b/tests/test-env-check.sh index 93b4e9b1402..70879649fec 100755 --- a/tests/test-env-check.sh +++ b/tests/test-env-check.sh @@ -20,15 +20,15 @@ python3 - << _END_ import sys -if sys.version_info.major < 3 or sys.version_info.minor < 5: +if sys.version_info.major < 3 or sys.version_info.minor < 6: exit(1) _END_ if [ $? = 1 ]; then - echo "Python 3.5 or newer is not installed/enabled." + echo "Python 3.6 or newer is not installed/enabled." return else - echo "Python 3.5 or newer detected!" + echo "Python 3.6 or newer detected!" fi # check for python development header -- for autest