support/testing: drop legacy python2 code

Now that we only have python3, we will never have to test a
python2-based build, so we can drop python2 compatibility
cruft.

In python3, print already is a function, we don't need to
import it from the future.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
Yann E. MORIN 2022-07-23 15:04:39 +02:00 committed by Arnout Vandecappelle (Essensium/Mind)
parent 8f79ab8f1e
commit caaa56c99f

View File

@ -27,7 +27,7 @@ class TestPythonBase(infra.basetest.BRTest):
self.assertRunOk(cmd, timeout)
def libc_time_test(self, timeout=-1):
cmd = self.interpreter + " -c 'from __future__ import print_function;"
cmd = self.interpreter + " -c '"
cmd += "import ctypes;"
cmd += "libc = ctypes.cdll.LoadLibrary(\"libc.so.1\");"
cmd += "print(libc.time(None))'"