Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating our autest suite to require Python3.6 #7113

Merged
merged 1 commit into from
Aug 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions ci/jenkins/bin/autest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,7 @@ set +x
echo -n "=======>>>> Started on "
date

AUTEST="/usr/bin/autest"
[ ! -x ${AUTEST} ] && AUTEST="/usr/local/bin/autest"
set -x

${AUTEST} -D ./tests/gold_tests --sandbox "$SANDBOX" --ats-bin "${INSTALL}/bin" $AUTEST_DEBUG $AUTEST_VERBOSE
./tests/autest.sh --sandbox "$SANDBOX" --ats-bin "${INSTALL}/bin" $AUTEST_DEBUG $AUTEST_VERBOSE
status=$?

set +x
Expand Down
4 changes: 2 additions & 2 deletions 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 ):
bneradt marked this conversation as resolved.
Show resolved Hide resolved
- 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 All @@ -53,7 +53,7 @@ AuTest and the relevant tools can be install manually instead of using the wrapp
When writing for the AuTest system please refer to the current [Online Documentation](https://autestsuite.bitbucket.io/) for general use of the system. To use CurlHeader tester for testing output of curl, please refer to [CurlHeader README](gold_tests/autest-site/readme.md)

## Documentation of AuTest extension for ATS.
Autest allows for the creation of extensions to help specialize and simplify test writing for a given application domain. Minus API addition the extension code will check that python 3.5 or better is used. There is also a new command line argumented added specifically for Trafficserver:
Autest allows for the creation of extensions to help specialize and simplify test writing for a given application domain. Minus API addition the extension code will check that python 3.6 or better is used. There is also a new command line argumented added specifically for Trafficserver:

--ats-bin < path to bin directory >

Expand Down
12 changes: 8 additions & 4 deletions tests/gold_tests/autest-site/init.cli.ext
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,18 @@

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)
"Tests need AuTest version {needed_version} or better, found version {found_version}\n"
"Please update AuTest:\n pip install --upgrade autest\n".format(
needed_version=autest_version,
found_version=AuTestVersion()),
show_stack=False)


Settings.path_argument(["--ats-bin"],
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