From: Kevin Laatz <kevin.laatz@intel.com>
To: dev@dpdk.org
Cc: bruce.richardson@intel.com, anatoly.burakov@intel.com,
robin.jarry@6wind.com, david.marchand@redhat.com,
Kevin Laatz <kevin.laatz@intel.com>,
Louise Kilheeney <louise.kilheeney@intel.com>
Subject: [dpdk-dev] [PATCH v7 06/10] app/test: support python3 only
Date: Mon, 21 Sep 2020 13:03:53 +0100 [thread overview]
Message-ID: <20200921120357.220588-7-kevin.laatz@intel.com> (raw)
In-Reply-To: <20200921120357.220588-1-kevin.laatz@intel.com>
Changed script to explicitly use python3 only to avoid
maintaining python 2 and removed deprecation notice.
Signed-off-by: Louise Kilheeney <louise.kilheeney@intel.com>
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
---
v6:
- Removed changes to mk/rte.sdktest.mk since the file no longer exists
---
app/test/autotest.py | 7 +------
app/test/autotest_data.py | 1 +
app/test/autotest_runner.py | 21 ++++++++-------------
app/test/autotest_test_funcs.py | 1 +
4 files changed, 11 insertions(+), 19 deletions(-)
diff --git a/app/test/autotest.py b/app/test/autotest.py
index cf7584ccd7..9eef1efbe5 100644
--- a/app/test/autotest.py
+++ b/app/test/autotest.py
@@ -1,9 +1,8 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2010-2014 Intel Corporation
# Script that uses either test app or qemu controlled by python-pexpect
-from __future__ import print_function
import autotest_data
import autotest_runner
import sys
@@ -17,10 +16,6 @@ def usage():
usage()
sys.exit(1)
-if sys.version_info.major < 3:
- print("WARNING: Python 2 is deprecated for use in DPDK, and will not work in future releases.", file=sys.stderr)
- print("Please use Python 3 instead", file=sys.stderr)
-
target = sys.argv[2]
test_whitelist = None
diff --git a/app/test/autotest_data.py b/app/test/autotest_data.py
index 4b7da45e09..097638941f 100644
--- a/app/test/autotest_data.py
+++ b/app/test/autotest_data.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2010-2014 Intel Corporation
diff --git a/app/test/autotest_runner.py b/app/test/autotest_runner.py
index 95e74c760d..998fe57a55 100644
--- a/app/test/autotest_runner.py
+++ b/app/test/autotest_runner.py
@@ -1,10 +1,10 @@
+#!/usr/bin/env python3
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2010-2014 Intel Corporation
# The main logic behind running autotests in parallel
-from __future__ import print_function
-import StringIO
+import io
import csv
from multiprocessing import Pool, Queue
import pexpect
@@ -50,11 +50,7 @@ def first_cpu_on_node(node_nr):
map(os.path.basename, cpu_path)
)
)
- # for compatibility between python 3 and 2 we need to make interable out
- # of filter return as it returns list in python 2 and a generator in 3
- m = next(iter(cpu_name))
- return int(m.group(1))
-
+ return int(next(cpu_name).group(1))
pool_child = None # per-process child
@@ -78,7 +74,7 @@ def pool_init(queue, result_queue):
cmdline = "%s %s" % (cmdline, prefix_cmdline)
# prepare logging of init
- startuplog = StringIO.StringIO()
+ startuplog = io.StringIO()
# run test app
try:
@@ -86,8 +82,7 @@ def pool_init(queue, result_queue):
print("\n%s %s\n" % ("=" * 20, prefix), file=startuplog)
print("\ncmdline=%s" % cmdline, file=startuplog)
- pool_child = pexpect.spawn(cmdline, logfile=startuplog)
-
+ pool_child = pexpect.spawn(cmdline, logfile=startuplog, encoding='utf-8')
# wait for target to boot
if not wait_prompt(pool_child):
pool_child.close()
@@ -138,7 +133,7 @@ def run_test(target, test):
# create log buffer for each test
# in multiprocessing environment, the logging would be
# interleaved and will create a mess, hence the buffering
- logfile = StringIO.StringIO()
+ logfile = io.StringIO()
pool_child.logfile = logfile
# make a note when the test started
@@ -210,9 +205,9 @@ def __init__(self, cmdline, target, blacklist, whitelist, n_processes):
# parse the binary for available test commands
binary = cmdline.split()[0]
stripped = 'not stripped' not in \
- subprocess.check_output(['file', binary])
+ subprocess.check_output(['file', binary]).decode()
if not stripped:
- symbols = subprocess.check_output(['nm', binary]).decode('utf-8')
+ symbols = subprocess.check_output(['nm', binary]).decode()
self.avail_cmds = re.findall('test_register_(\w+)', symbols)
else:
self.avail_cmds = None
diff --git a/app/test/autotest_test_funcs.py b/app/test/autotest_test_funcs.py
index 26688b7132..775dfd1dc5 100644
--- a/app/test/autotest_test_funcs.py
+++ b/app/test/autotest_test_funcs.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2010-2014 Intel Corporation
--
2.25.1
next prev parent reply other threads:[~2020-09-21 12:09 UTC|newest]
Thread overview: 175+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-22 13:23 [dpdk-dev] [PATCH 20.08 0/9] adding support for python 3 only Louise Kilheeney
2020-05-22 13:23 ` [dpdk-dev] [PATCH 20.08 1/9] app/test-bbdev: support python3 only Louise Kilheeney
2020-05-26 18:58 ` Chautru, Nicolas
2020-05-22 13:23 ` [dpdk-dev] [PATCH 20.08 2/9] usertools/dpdk-devbind: " Louise Kilheeney
2020-05-28 12:39 ` Burakov, Anatoly
2020-05-28 12:41 ` Burakov, Anatoly
2020-05-22 13:23 ` [dpdk-dev] [PATCH 20.08 3/9] usertools/dpdk-telemetry-client: " Louise Kilheeney
2020-05-22 13:23 ` [dpdk-dev] [PATCH 20.08 4/9] usertools/dpdk-pmdinfo: " Louise Kilheeney
2020-05-22 13:23 ` [dpdk-dev] [PATCH 20.08 5/9] usertools/cpu_layout: " Louise Kilheeney
2020-05-22 13:23 ` [dpdk-dev] [PATCH 20.08 6/9] app/test-cmdline: " Louise Kilheeney
2020-05-22 13:23 ` [dpdk-dev] [PATCH 20.08 7/9] app/test: " Louise Kilheeney
2020-05-22 13:23 ` [dpdk-dev] [PATCH 20.08 8/9] devtools: " Louise Kilheeney
2020-05-27 6:15 ` Ray Kinsella
2020-05-22 13:23 ` [dpdk-dev] [PATCH 20.08 9/9] config/arm: " Louise Kilheeney
2020-05-22 13:46 ` Thomas Monjalon
2020-05-22 14:10 ` Kilheeney, Louise
2020-05-23 21:27 ` Thomas Monjalon
2020-05-25 9:53 ` Bruce Richardson
2020-06-25 9:34 ` Harman Kalra
2020-05-25 7:27 ` [dpdk-dev] [PATCH 20.08 0/9] adding support for python 3 only Robin Jarry
2020-05-25 9:51 ` Bruce Richardson
2020-05-25 10:29 ` Robin Jarry
2020-05-25 10:56 ` Kilheeney, Louise
2020-05-25 11:06 ` Robin Jarry
2020-06-17 15:10 ` [dpdk-dev] [PATCH v2 " Louise Kilheeney
2020-06-17 15:10 ` [dpdk-dev] [PATCH v2 1/9] app/test-bbdev: support python3 only Louise Kilheeney
2020-06-25 12:46 ` Burakov, Anatoly
2020-06-17 15:10 ` [dpdk-dev] [PATCH v2 2/9] usertools/dpdk-devbind: " Louise Kilheeney
2020-06-25 12:48 ` Burakov, Anatoly
2020-06-17 15:10 ` [dpdk-dev] [PATCH v2 3/9] usertools/dpdk-telemetry-client: " Louise Kilheeney
2020-06-25 12:49 ` Burakov, Anatoly
2020-06-17 15:10 ` [dpdk-dev] [PATCH v2 4/9] usertools/dpdk-pmdinfo: " Louise Kilheeney
2020-06-17 17:19 ` Neil Horman
2020-07-02 11:23 ` Neil Horman
2020-06-17 15:10 ` [dpdk-dev] [PATCH v2 5/9] usertools/cpu_layout: " Louise Kilheeney
2020-06-25 12:49 ` Burakov, Anatoly
2020-06-17 15:10 ` [dpdk-dev] [PATCH v2 6/9] app/test-cmdline: " Louise Kilheeney
2020-06-26 9:28 ` Burakov, Anatoly
2020-06-17 15:10 ` [dpdk-dev] [PATCH v2 7/9] app/test: " Louise Kilheeney
2020-06-26 9:30 ` Burakov, Anatoly
2020-06-17 15:10 ` [dpdk-dev] [PATCH v2 8/9] devtools: " Louise Kilheeney
2020-06-17 15:10 ` [dpdk-dev] [PATCH v2 9/9] config/arm: " Louise Kilheeney
2020-06-26 9:31 ` Burakov, Anatoly
2020-07-02 10:37 ` [dpdk-dev] [PATCH v3 0/9] dding support for python 3 only Louise Kilheeney
2020-07-02 10:37 ` [dpdk-dev] [PATCH v3 1/9] app/test-bbdev: support python3 only Louise Kilheeney
2020-07-02 10:37 ` [dpdk-dev] [PATCH v3 2/9] usertools/dpdk-devbind: " Louise Kilheeney
2020-07-02 10:37 ` [dpdk-dev] [PATCH v3 3/9] usertools/dpdk-telemetry-client: " Louise Kilheeney
2020-07-02 10:37 ` [dpdk-dev] [PATCH v3 4/9] usertools/dpdk-pmdinfo: " Louise Kilheeney
2020-07-02 10:37 ` [dpdk-dev] [PATCH v3 5/9] usertools/cpu_layout: " Louise Kilheeney
2020-07-02 10:37 ` [dpdk-dev] [PATCH v3 6/9] app/test-cmdline: " Louise Kilheeney
2020-07-02 10:37 ` [dpdk-dev] [PATCH v3 7/9] app/test: " Louise Kilheeney
2020-07-02 10:37 ` [dpdk-dev] [PATCH v3 8/9] devtools: " Louise Kilheeney
2020-07-02 10:37 ` [dpdk-dev] [PATCH v3 9/9] config/arm: " Louise Kilheeney
2020-07-08 8:59 ` [dpdk-dev] [PATCH v3 0/9] dding support for python 3 only David Marchand
2020-07-08 10:13 ` Kilheeney, Louise
2020-08-04 14:07 ` [dpdk-dev] [PATCH v4 0/9] adding " Louise Kilheeney
2020-08-04 14:07 ` [dpdk-dev] [PATCH v4 1/9] usertools/dpdk-telemetry-client: support python3 only Louise Kilheeney
2020-08-05 9:10 ` Bruce Richardson
2020-08-04 14:07 ` [dpdk-dev] [PATCH v4 2/9] usertools/dpdk-devbind: " Louise Kilheeney
2020-08-12 14:27 ` Bruce Richardson
2020-08-04 14:07 ` [dpdk-dev] [PATCH v4 3/9] usertools/dpdk-pmdinfo: " Louise Kilheeney
2020-08-12 14:44 ` Bruce Richardson
2020-08-04 14:07 ` [dpdk-dev] [PATCH v4 4/9] usertools/cpu_layout: " Louise Kilheeney
2020-08-12 14:49 ` Bruce Richardson
2020-08-04 14:07 ` [dpdk-dev] [PATCH v4 5/9] app/test-cmdline: " Louise Kilheeney
2020-08-12 15:05 ` Bruce Richardson
2020-08-04 14:07 ` [dpdk-dev] [PATCH v4 6/9] app/test: " Louise Kilheeney
2020-08-04 14:07 ` [dpdk-dev] [PATCH v4 7/9] devtools: " Louise Kilheeney
2020-08-05 8:44 ` Kinsella, Ray
2020-08-04 14:07 ` [dpdk-dev] [PATCH v4 8/9] config/arm: " Louise Kilheeney
2020-08-04 14:07 ` [dpdk-dev] [PATCH v4 9/9] app/test-bbdev: " Louise Kilheeney
2020-08-21 9:14 ` [dpdk-dev] [PATCH v5 0/9]adding support for python 3 only Louise Kilheeney
2020-08-21 9:14 ` [dpdk-dev] [PATCH v5 1/9] usertools/dpdk-telemetry-client: support python3 only Louise Kilheeney
2020-08-21 9:14 ` [dpdk-dev] [PATCH v5 2/9] usertools/dpdk-devbind: " Louise Kilheeney
2020-08-21 9:14 ` [dpdk-dev] [PATCH v5 3/9] usertools/dpdk-pmdinfo: " Louise Kilheeney
2020-08-21 12:42 ` Neil Horman
2020-08-21 9:14 ` [dpdk-dev] [PATCH v5 4/9] usertools/cpu_layout: " Louise Kilheeney
2020-08-21 9:14 ` [dpdk-dev] [PATCH v5 5/9] app/test-cmdline: " Louise Kilheeney
2020-08-21 9:24 ` Bruce Richardson
2020-08-21 9:14 ` [dpdk-dev] [PATCH v5 6/9] app/test: " Louise Kilheeney
2020-08-21 9:14 ` [dpdk-dev] [PATCH v5 7/9] devtools: " Louise Kilheeney
2020-08-21 12:42 ` Neil Horman
2020-08-21 9:14 ` [dpdk-dev] [PATCH v5 8/9] config/arm: " Louise Kilheeney
2020-08-21 9:14 ` [dpdk-dev] [PATCH v5 9/9] app/test-bbdev: " Louise Kilheeney
2020-09-15 14:11 ` [dpdk-dev] [PATCH v5 0/9]adding support for python 3 only David Marchand
2020-09-21 11:46 ` [dpdk-dev] [PATCH v6 00/10] adding " Kevin Laatz
2020-09-21 11:46 ` [dpdk-dev] [PATCH v6 01/10] usertools/dpdk-telemetry-client: support python3 only Kevin Laatz
2020-09-21 11:46 ` [dpdk-dev] [PATCH v6 02/10] usertools/dpdk-devbind: " Kevin Laatz
2020-09-21 11:46 ` [dpdk-dev] [PATCH v6 03/10] usertools/dpdk-pmdinfo: " Kevin Laatz
2020-09-21 11:46 ` [dpdk-dev] [PATCH v6 04/10] usertools/cpu_layout: " Kevin Laatz
2020-09-21 11:46 ` [dpdk-dev] [PATCH v6 05/10] app/test-cmdline: " Kevin Laatz
2020-09-21 11:46 ` [dpdk-dev] [PATCH v6 06/10] app/test: " Kevin Laatz
2020-09-21 11:46 ` [dpdk-dev] [PATCH v6 07/10] devtools: " Kevin Laatz
2020-09-21 11:46 ` [dpdk-dev] [PATCH v6 08/10] config/arm: " Kevin Laatz
2020-09-21 11:46 ` [dpdk-dev] [PATCH v6 09/10] app/test-bbdev: " Kevin Laatz
2020-09-21 11:46 ` [dpdk-dev] [PATCH v6 10/10] buildtools: " Kevin Laatz
2020-09-21 12:03 ` [dpdk-dev] [PATCH v7 00/10] adding support for python 3 only Kevin Laatz
2020-09-21 12:03 ` [dpdk-dev] [PATCH v7 01/10] usertools/dpdk-telemetry-client: support python3 only Kevin Laatz
2020-09-25 14:32 ` Robin Jarry
2020-09-21 12:03 ` [dpdk-dev] [PATCH v7 02/10] usertools/dpdk-devbind: " Kevin Laatz
2020-09-25 14:49 ` Robin Jarry
2020-09-21 12:03 ` [dpdk-dev] [PATCH v7 03/10] usertools/dpdk-pmdinfo: " Kevin Laatz
2020-09-25 14:50 ` Robin Jarry
2020-09-21 12:03 ` [dpdk-dev] [PATCH v7 04/10] usertools/cpu_layout: " Kevin Laatz
2020-09-25 14:51 ` Robin Jarry
2020-09-21 12:03 ` [dpdk-dev] [PATCH v7 05/10] app/test-cmdline: " Kevin Laatz
2020-09-25 14:52 ` Robin Jarry
2020-09-21 12:03 ` Kevin Laatz [this message]
2020-09-25 14:54 ` [dpdk-dev] [PATCH v7 06/10] app/test: " Robin Jarry
2020-09-21 12:03 ` [dpdk-dev] [PATCH v7 07/10] devtools: " Kevin Laatz
2020-09-25 14:55 ` Robin Jarry
2020-09-21 12:03 ` [dpdk-dev] [PATCH v7 08/10] config/arm: " Kevin Laatz
2020-09-25 14:55 ` Robin Jarry
2020-09-21 12:03 ` [dpdk-dev] [PATCH v7 09/10] app/test-bbdev: " Kevin Laatz
2020-09-25 14:56 ` Robin Jarry
2020-09-21 12:03 ` [dpdk-dev] [PATCH v7 10/10] buildtools: " Kevin Laatz
2020-09-25 14:56 ` Robin Jarry
2020-09-28 10:43 ` [dpdk-dev] [PATCH v8 00/10] adding support for python 3 only Kevin Laatz
2020-09-28 10:43 ` [dpdk-dev] [PATCH v8 01/10] usertools/dpdk-telemetry-client: support python3 only Kevin Laatz
2020-09-28 11:24 ` Robin Jarry
2020-09-28 10:43 ` [dpdk-dev] [PATCH v8 02/10] usertools/dpdk-devbind: " Kevin Laatz
2020-09-28 11:25 ` Robin Jarry
2020-09-28 10:43 ` [dpdk-dev] [PATCH v8 03/10] usertools/dpdk-pmdinfo: " Kevin Laatz
2020-09-28 11:25 ` Robin Jarry
2020-09-28 10:43 ` [dpdk-dev] [PATCH v8 04/10] usertools/cpu_layout: " Kevin Laatz
2020-09-28 11:26 ` Robin Jarry
2020-09-28 10:43 ` [dpdk-dev] [PATCH v8 05/10] app/test-cmdline: " Kevin Laatz
2020-09-28 11:27 ` Robin Jarry
2020-09-28 10:43 ` [dpdk-dev] [PATCH v8 06/10] app/test: " Kevin Laatz
2020-09-28 10:43 ` [dpdk-dev] [PATCH v8 07/10] devtools: " Kevin Laatz
2020-09-28 10:43 ` [dpdk-dev] [PATCH v8 08/10] config/arm: " Kevin Laatz
2020-09-28 10:43 ` [dpdk-dev] [PATCH v8 09/10] app/test-bbdev: " Kevin Laatz
2020-09-28 10:43 ` [dpdk-dev] [PATCH v8 10/10] buildtools: " Kevin Laatz
2020-09-28 11:23 ` Robin Jarry
2020-09-28 11:29 ` [dpdk-dev] [PATCH v8 00/10] adding support for python 3 only Robin Jarry
2020-09-28 15:09 ` Bruce Richardson
2020-09-28 15:09 ` David Marchand
2020-09-28 15:14 ` Bruce Richardson
2020-09-28 15:36 ` Kevin Laatz
2020-09-29 10:22 ` [dpdk-dev] [PATCH v9 00/11] " Kevin Laatz
2020-09-29 10:22 ` [dpdk-dev] [PATCH v9 01/11] usertools/dpdk-telemetry-client: support python3 only Kevin Laatz
2020-09-29 10:22 ` [dpdk-dev] [PATCH v9 02/11] usertools/dpdk-devbind: " Kevin Laatz
2020-09-29 10:22 ` [dpdk-dev] [PATCH v9 03/11] usertools/dpdk-pmdinfo: " Kevin Laatz
2020-09-29 10:22 ` [dpdk-dev] [PATCH v9 04/11] usertools/cpu_layout: " Kevin Laatz
2020-09-29 10:22 ` [dpdk-dev] [PATCH v9 05/11] app/test-cmdline: " Kevin Laatz
2020-09-29 10:22 ` [dpdk-dev] [PATCH v9 06/11] app/test: " Kevin Laatz
2020-09-29 10:22 ` [dpdk-dev] [PATCH v9 07/11] devtools: " Kevin Laatz
2020-09-29 10:22 ` [dpdk-dev] [PATCH v9 08/11] config/arm: " Kevin Laatz
2020-09-29 10:22 ` [dpdk-dev] [PATCH v9 09/11] app/test-bbdev: " Kevin Laatz
2020-09-29 10:22 ` [dpdk-dev] [PATCH v9 10/11] buildtools: " Kevin Laatz
2020-09-29 10:22 ` [dpdk-dev] [PATCH v9 11/11] doc: " Kevin Laatz
2020-09-30 8:18 ` Kinsella, Ray
2020-09-29 12:22 ` [dpdk-dev] [PATCH v9 00/11] adding support for python 3 only David Marchand
2020-09-29 15:25 ` Kevin Laatz
2020-09-29 15:48 ` Bruce Richardson
2020-09-29 15:54 ` Robin Jarry
2020-09-29 16:33 ` Bruce Richardson
2020-09-29 14:40 ` Stephen Hemminger
2020-09-30 11:40 ` [dpdk-dev] [PATCH v10 " Kevin Laatz
2020-09-30 11:40 ` [dpdk-dev] [PATCH v10 01/11] usertools/dpdk-telemetry: support python3 only Kevin Laatz
2020-09-30 11:40 ` [dpdk-dev] [PATCH v10 02/11] usertools/dpdk-devbind: " Kevin Laatz
2020-09-30 11:40 ` [dpdk-dev] [PATCH v10 03/11] usertools/dpdk-pmdinfo: " Kevin Laatz
2020-09-30 11:40 ` [dpdk-dev] [PATCH v10 04/11] usertools/cpu_layout: " Kevin Laatz
2020-10-02 9:51 ` David Marchand
2020-09-30 11:40 ` [dpdk-dev] [PATCH v10 05/11] app/test-cmdline: " Kevin Laatz
2020-09-30 11:40 ` [dpdk-dev] [PATCH v10 06/11] app/test: " Kevin Laatz
2020-09-30 11:40 ` [dpdk-dev] [PATCH v10 07/11] devtools: " Kevin Laatz
2020-09-30 11:40 ` [dpdk-dev] [PATCH v10 08/11] config/arm: " Kevin Laatz
2020-09-30 11:40 ` [dpdk-dev] [PATCH v10 09/11] app/test-bbdev: " Kevin Laatz
2020-09-30 11:40 ` [dpdk-dev] [PATCH v10 10/11] buildtools: " Kevin Laatz
2020-09-30 11:40 ` [dpdk-dev] [PATCH v10 11/11] doc: " Kevin Laatz
2020-10-02 11:01 ` David Marchand
2020-10-02 11:07 ` Kevin Laatz
2020-10-02 11:18 ` Bruce Richardson
2020-10-02 12:54 ` [dpdk-dev] [PATCH v10 00/11] adding support for python 3 only David Marchand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200921120357.220588-7-kevin.laatz@intel.com \
--to=kevin.laatz@intel.com \
--cc=anatoly.burakov@intel.com \
--cc=bruce.richardson@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=louise.kilheeney@intel.com \
--cc=robin.jarry@6wind.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).