mirror of
https://github.com/certbot/certbot.git
synced 2026-01-26 07:41:33 +03:00
Fixes #6955. This updates the Fedora version used in our test farm tests to Fedora 30. The AMI ID comes from https://alt.fedoraproject.org/cloud/ where it is listed as their standard HVM AMI for the region we use us-east-1 (US East (N. Virginia)). Unfortunately, there were a lot of small changes required for this. The big reason for this is on Fedora, there isn't a Python 2 executable installed. In fact, there's not even an executable named python. It's just python3. Rather than installing another Python in each test, I wrote a script that the test scripts can share to figure out the different paths and names that should be used in their script. (This isn't used in test_sdists.sh because the logic is a little different.) Other changes here worth flagging are: I changed the name of the variable RUN_PYTHON3_TESTS in test_leauto_upgrades.sh to RUN_RHEL6_TESTS. The tests that are run when this variable is set test the upgrade from Python 2 to Python 3 on RHEL 6. I think this new name is much better now that we also have Fedora running Python 3. I made tools/simple_http_server.py work on Python 3. You can see tests passing with these changes at https://travis-ci.com/certbot/certbot/builds/113821476. I also ran test_tests.sh and they passed. * Update to Fedora 30 in test farm tests. Fedora 28 is likely to reach its EOL soon. * Add set_python_envvars.sh. * Fix test_apache2.sh on python3 only distros. * Fix test_leauto_upgrades.sh on python3 systems. * Fix certonly_standalone tests with python3 only * Fix test_sdists.sh on python3 only distros. * Make simple_http_server.py work on Python 3. * add comments
18 lines
593 B
Bash
Executable File
18 lines
593 B
Bash
Executable File
#!/bin/sh
|
|
# This is a simple script that can be sourced to set Python environment
|
|
# variables for use in Certbot's letstest test farm tests.
|
|
|
|
# Some distros like Fedora may only have an executable named python3 installed.
|
|
if command -v python; then
|
|
PYTHON_NAME="python"
|
|
VENV_SCRIPT="tools/venv.py"
|
|
VENV_PATH="venv"
|
|
else
|
|
# We could check for "python2" here, however, the addition of "python3"
|
|
# only systems is what necessitated this change so checking for "python2"
|
|
# isn't necessary.
|
|
PYTHON_NAME="python3"
|
|
VENV_PATH="venv3"
|
|
VENV_SCRIPT="tools/venv3.py"
|
|
fi
|