[v4,5/9] app/test-cmdline: support python3 only
Checks
Commit Message
Changed script to explicitly use python3 only to avoid
maintaining python 2 and removed deprecation notice.
Cc: Olivier Matz <olivier.matz@6wind.com>
Signed-off-by: Louise Kilheeney <louise.kilheeney@intel.com>
---
app/test-cmdline/cmdline_test.py | 7 +------
app/test-cmdline/cmdline_test_data.py | 1 +
mk/rte.sdktest.mk | 2 +-
3 files changed, 3 insertions(+), 7 deletions(-)
Comments
On Tue, Aug 04, 2020 at 03:07:34PM +0100, Louise Kilheeney wrote:
> Changed script to explicitly use python3 only to avoid
> maintaining python 2 and removed deprecation notice.
>
> Cc: Olivier Matz <olivier.matz@6wind.com>
>
> Signed-off-by: Louise Kilheeney <louise.kilheeney@intel.com>
> ---
With this patch applied I'm seeing a failure with the final test the
history fill test. It passes without this patch applied. Do you see the
same thing?
/Bruce
@@ -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 runs cmdline_test app and feeds keystrokes into it.
-from __future__ import print_function
import cmdline_test_data
import os
import pexpect
@@ -19,10 +18,6 @@ def runTest(child, test):
return 0
child.expect(test["Result"], 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)
-
#
# history test is a special case
#
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2010-2014 Intel Corporation
@@ -63,7 +63,7 @@ coverage:
@mkdir -p $(AUTOTEST_DIR) ; \
cd $(AUTOTEST_DIR) ; \
if [ -f $(RTE_OUTPUT)/app/test ]; then \
- python $(RTE_SDK)/test/cmdline_test/cmdline_test.py \
+ python3 $(RTE_SDK)/test/cmdline_test/cmdline_test.py \
$(RTE_OUTPUT)/app/cmdline_test; \
ulimit -S -n 100 ; \
python $(RTE_SDK)/app/test/autotest.py \