Skip to content

Commit

Permalink
Updating our autest suite to require Python3.6
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bneradt committed Aug 13, 2020
1 parent c5e25a2 commit 8356153
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.)
Expand Down
6 changes: 3 additions & 3 deletions tests/gold_tests/autest-site/init.cli.ext
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions tests/test-env-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8356153

Please sign in to comment.