[Fuego] [PATCH] python3: Use python3 in the scripts to fully migrate
[email protected] Fri, 30 Sep 2022 19:56:39 +0530
| Newsgroups | dev.linux.lists.fuego |
|---|---|
| Message-ID | <[email protected]> |
From: venkata pyla <[email protected]> The python scripts are failing to run in an environment where `python` is not defined, though the scripts are migrated to work on python3 the shebang is still pointing to python which may be undefined Signed-off-by: venkata pyla <[email protected]> --- scripts/check-dependencies | 2 +- scripts/common.sh | 8 ++++---- scripts/ftc | 2 +- scripts/functions.sh | 2 +- tests/Benchmark.Dhrystone/parser.py | 2 +- tests/Benchmark.IOzone/parser.py | 2 +- tests/Benchmark.Stream/parser.py | 2 +- tests/Benchmark.bonnie/parser.py | 2 +- tests/Benchmark.cyclictest/parser.py | 2 +- tests/Benchmark.fio/parser.py | 2 +- tests/Benchmark.hackbench/parser.py | 2 +- tests/Benchmark.lmbench2/parser.py | 2 +- tests/Benchmark.migratetest/parser.py | 2 +- tests/Benchmark.pmqtest/parser.py | 2 +- tests/Benchmark.ptsematest/parser.py | 2 +- tests/Benchmark.signaltest/parser.py | 2 +- tests/Benchmark.sigwaittest/parser.py | 2 +- tests/Benchmark.svsematest/parser.py | 2 +- tests/Functional.LTP/fuego_test.sh | 4 ++-- tests/Functional.LTP/ltp_process.py | 2 +- tests/Functional.LTP/parser.py | 2 +- tests/Functional.LTP_one_test/parser.py | 2 +- tests/Functional.autopkgtest/parser.py | 2 +- tests/Functional.linaro/parser.py | 2 +- 24 files changed, 28 insertions(+), 28 deletions(-) diff --git a/scripts/check-dependencies b/scripts/check-dependencies index 583012e..7369bd4 100755 --- a/scripts/check-dependencies +++ b/scripts/check-dependencies @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # vim: set ts=4 sw=4 et : # # check_dependencies - check config dependencies listed in a file diff --git a/scripts/common.sh b/scripts/common.sh index f916d84..cf93ddb 100644 --- a/scripts/common.sh +++ b/scripts/common.sh @@ -108,20 +108,20 @@ function run_python() { if [ ! -z $ORIG_PATH ] ; then dprint "run_python with PATH=$ORIG_PATH, TOOLCHAIN=$TOOLCHAIN" export TOOLCHAIN - PATH=$ORIG_PATH TOOLCHAIN=$TOOLCHAIN python "$@" + PATH=$ORIG_PATH TOOLCHAIN=$TOOLCHAIN python3 "$@" else dprint "run_python with TOOLCHAIN=$TOOLCHAIN" export TOOLCHAIN - TOOLCHAIN=$TOOLCHAIN python "$@" + TOOLCHAIN=$TOOLCHAIN python3 "$@" fi } function run_python_quiet() { if [ ! -z $ORIG_PATH ] then - PATH=$ORIG_PATH python "$@" + PATH=$ORIG_PATH python3 "$@" else - python "$@" + python3 "$@" fi } diff --git a/scripts/ftc b/scripts/ftc index adce17b..4c5ff7e 100755 --- a/scripts/ftc +++ b/scripts/ftc @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # # vim: set ts=4 sw=4 et : # diff --git a/scripts/functions.sh b/scripts/functions.sh index 7afe423..5a6e0e5 100755 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -506,7 +506,7 @@ function build { call_if_present test_build ret=$? build_end_time=$(date +"%s.%N") - build_duration=$(python -c "print($build_end_time - $build_start_time)") + build_duration=$(python3 -c "print($build_end_time - $build_start_time)") # test_build may change the current dir # get back to root of build dir, before 'touch' diff --git a/tests/Benchmark.Dhrystone/parser.py b/tests/Benchmark.Dhrystone/parser.py index fd07cff..868f9de 100755 --- a/tests/Benchmark.Dhrystone/parser.py +++ b/tests/Benchmark.Dhrystone/parser.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 import os, re, sys import common as plib diff --git a/tests/Benchmark.IOzone/parser.py b/tests/Benchmark.IOzone/parser.py index b1631ae..a56aa0e 100755 --- a/tests/Benchmark.IOzone/parser.py +++ b/tests/Benchmark.IOzone/parser.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 import os, sys import common as plib diff --git a/tests/Benchmark.Stream/parser.py b/tests/Benchmark.Stream/parser.py index a564d74..926e611 100755 --- a/tests/Benchmark.Stream/parser.py +++ b/tests/Benchmark.Stream/parser.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 import os, re, sys import common as plib diff --git a/tests/Benchmark.bonnie/parser.py b/tests/Benchmark.bonnie/parser.py index b68bc3e..962a7cd 100755 --- a/tests/Benchmark.bonnie/parser.py +++ b/tests/Benchmark.bonnie/parser.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 import os, re, sys import common as plib diff --git a/tests/Benchmark.cyclictest/parser.py b/tests/Benchmark.cyclictest/parser.py index c29393e..4252654 100755 --- a/tests/Benchmark.cyclictest/parser.py +++ b/tests/Benchmark.cyclictest/parser.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 import os, re, sys import common as plib diff --git a/tests/Benchmark.fio/parser.py b/tests/Benchmark.fio/parser.py index ab3ea34..fedb734 100644 --- a/tests/Benchmark.fio/parser.py +++ b/tests/Benchmark.fio/parser.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # See common.py for description of command-line arguments import os, sys diff --git a/tests/Benchmark.hackbench/parser.py b/tests/Benchmark.hackbench/parser.py index a22c480..3ac9ba5 100755 --- a/tests/Benchmark.hackbench/parser.py +++ b/tests/Benchmark.hackbench/parser.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 import os, re, sys import common as plib diff --git a/tests/Benchmark.lmbench2/parser.py b/tests/Benchmark.lmbench2/parser.py index f06f132..410b46e 100755 --- a/tests/Benchmark.lmbench2/parser.py +++ b/tests/Benchmark.lmbench2/parser.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 import os, re, sys import common as plib diff --git a/tests/Benchmark.migratetest/parser.py b/tests/Benchmark.migratetest/parser.py index 627ec2d..21b7c56 100755 --- a/tests/Benchmark.migratetest/parser.py +++ b/tests/Benchmark.migratetest/parser.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 import os, re, sys import common as plib diff --git a/tests/Benchmark.pmqtest/parser.py b/tests/Benchmark.pmqtest/parser.py index 05ee57b..a5c31ba 100755 --- a/tests/Benchmark.pmqtest/parser.py +++ b/tests/Benchmark.pmqtest/parser.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 import os, re, sys import common as plib diff --git a/tests/Benchmark.ptsematest/parser.py b/tests/Benchmark.ptsematest/parser.py index 05ee57b..a5c31ba 100755 --- a/tests/Benchmark.ptsematest/parser.py +++ b/tests/Benchmark.ptsematest/parser.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 import os, re, sys import common as plib diff --git a/tests/Benchmark.signaltest/parser.py b/tests/Benchmark.signaltest/parser.py index 1992b21..95d4340 100755 --- a/tests/Benchmark.signaltest/parser.py +++ b/tests/Benchmark.signaltest/parser.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 import os, re, sys import common as plib diff --git a/tests/Benchmark.sigwaittest/parser.py b/tests/Benchmark.sigwaittest/parser.py index 25a0262..120b7b5 100755 --- a/tests/Benchmark.sigwaittest/parser.py +++ b/tests/Benchmark.sigwaittest/parser.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 import os, re, sys import common as plib diff --git a/tests/Benchmark.svsematest/parser.py b/tests/Benchmark.svsematest/parser.py index 05ee57b..a5c31ba 100755 --- a/tests/Benchmark.svsematest/parser.py +++ b/tests/Benchmark.svsematest/parser.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 import os, re, sys import common as plib diff --git a/tests/Functional.LTP/fuego_test.sh b/tests/Functional.LTP/fuego_test.sh index ef58bcc..95dea2c 100755 --- a/tests/Functional.LTP/fuego_test.sh +++ b/tests/Functional.LTP/fuego_test.sh @@ -475,9 +475,9 @@ function test_processing { # ImportError: No module named style if [ -n "$ORIG_PATH" ] ; then # Use ORIG_PATH, if defined, so that python works properly - PATH=$ORIG_PATH python ltp_process.py + PATH=$ORIG_PATH python3 ltp_process.py else - python ltp_process.py + python3 ltp_process.py fi [ -e results.xlsx ] && cp results.xlsx ${LOGDIR}/results.xlsx diff --git a/tests/Functional.LTP/ltp_process.py b/tests/Functional.LTP/ltp_process.py index 8e2b637..27bc856 100644 --- a/tests/Functional.LTP/ltp_process.py +++ b/tests/Functional.LTP/ltp_process.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # -*- coding: UTF-8 -*- from openpyxl import Workbook from openpyxl.styles import Border, Side, PatternFill, Color, Alignment diff --git a/tests/Functional.LTP/parser.py b/tests/Functional.LTP/parser.py index 9ad7659..3467328 100755 --- a/tests/Functional.LTP/parser.py +++ b/tests/Functional.LTP/parser.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # -*- coding: UTF-8 -*- import os, os.path, re, sys import common as plib diff --git a/tests/Functional.LTP_one_test/parser.py b/tests/Functional.LTP_one_test/parser.py index 312bd5b..7002e35 100755 --- a/tests/Functional.LTP_one_test/parser.py +++ b/tests/Functional.LTP_one_test/parser.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # See common.py for description of command-line arguments import os diff --git a/tests/Functional.autopkgtest/parser.py b/tests/Functional.autopkgtest/parser.py index ba3dea1..ba8d2a0 100755 --- a/tests/Functional.autopkgtest/parser.py +++ b/tests/Functional.autopkgtest/parser.py @@ -1,4 +1,4 @@ -#!/bin/python +#!/bin/python3 import os, re, sys import common as plib diff --git a/tests/Functional.linaro/parser.py b/tests/Functional.linaro/parser.py index 48b502b..5bbb5de 100755 --- a/tests/Functional.linaro/parser.py +++ b/tests/Functional.linaro/parser.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 import os, sys, collections import common as plib -- 2.20.1