1
0
mirror of https://github.com/OlafvdSpek/ctemplate.git synced 2025-09-28 19:05:49 +08:00

Switch generate_fsm_test.sh to Python 3

Switch the non-default Python versions to Python 3 too, using Python 3.5
as minimum version (older Python 3 versions are already EOL).
This commit is contained in:
Pino Toscano 2019-12-29 11:35:09 +01:00
parent ee11ba100a
commit c0a7f4a9b5

View File

@ -48,8 +48,8 @@ GENERATE_FSM="$TOOLS_DIR/generate_fsm.py"
EXPECTED="`cat $OUTPUT_FILE`"
if [ -z "$EXPECTED" ]; then die "Error reading $OUTPUT_FILE"; fi
# Let's make sure the script works with python2.2 and above
for PYTHON in "" "python2.2" "python2.3" "python2.4" "python2.5" "python2.6"; do
# Let's make sure the script works with python3.5 and above
for PYTHON in "" "python3.5" "python3.6" "python3.7" "python3.8" "python3.9"; do
# Skip the versions of python that are not installed.
if [ -n "$PYTHON" ]; then
$PYTHON -h >/dev/null 2>/dev/null || continue